Work Proposal: Support for community content on farmos.org

A day later than hoped, but the core deliverables are ready, as outlined below. I know @mstenta is taking time off for another week or more, and as far as I know there’s no content waiting to be published, so I don’t see any rush to sign off on these acceptance criteria, but I wanted to make sure to hand it off before this holiday weekend here in the states. Perhaps we can review it at the next Monthy Call on July 13th.

Deliverable 1: Implementation

These can be viewed in the preview deployment:

There are some decisions that need to be made about what to name the index page and where to place it in the navigation, but that can all be easily configured.

With regard to the Front Matter properties that can be added to markdown posts, I’ve started us off with the following:

  • author: Defaults to "the farmOS Community".
  • canonical: Optional.
  • date: Required.
  • slug: Defaults to the directory name if not provided.
  • title: Required, unless a an h1 is provided in the markdown.

The only absolutely required property is date, because I don’t see a good way around this to provide some minimal degree of sorting, as well as a means of approximating how up-to-date a post is. Also note that the first h1 element in the markdown, regardless of whether it’s used as the title in the main heading, will be stripped out of the markdown itself. This behavior could be modified or made configurable, but for a first pass this seemed like the most sensible choice. The Front Matter properties as a whole can be structured however we wish, they just need to be changed in the GraphQL type definitions provided to Gatsby.

Deliverable 2: Feature branch

I’ve opened a Pull Request for these feature from the blog branch from my own fork, ready to merge or accept additional commits:

As I noted there, I don’t think it should be merged until we have some content ready to publish and make some time to decide on some of the configuration choices I mentioned under Deliverable 1. If nothing else, we need to set the source repo and branch once we know what those will be.

Deliverable 3: Source repository

I’ve created a bare-bones source repository and testing branch, here:

The main branch is even more bare, with only 3 files: a license, a README and a .gitignore. No config.yml file is needed, since I don’t think we want to manually place each individual post in the navigation menu, and the rest can be configured from site-data.js in the farmOS.org repo. If we want, we can transfer farmOS-community-blog to the farmOS GitHub organization, or create a new one, or whatever we like, so long as we update site-data.js accordingly.

3 Likes