Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog categories #55

Open
mstenta opened this issue Oct 31, 2022 · 2 comments
Open

Blog categories #55

mstenta opened this issue Oct 31, 2022 · 2 comments
Labels
blog Issues/requests pertaining to the farmOS community blog

Comments

@mstenta
Copy link
Member

mstenta commented Oct 31, 2022

We discussed adding the ability to "tag" or categorize blog posts.

In a technical sense, we could fairly easily create a category property in Front matter, we would just need to decide how to present those separate categories in the navigation and other UI elements.

https://farmos.discourse.group/t/work-proposal-support-for-community-content-on-farmos-org/1265/3

@mstenta mstenta added the blog Issues/requests pertaining to the farmOS community blog label Oct 31, 2022
@mstenta mstenta mentioned this issue Oct 31, 2022
Merged
@jgaehring
Copy link
Member

Just to clarify on this point a bit further and summarize what we originally distinguished as category as opposed to tags...

If I remember correctly, category was more the type or format of a post, rather than just descriptive keywords of the content. So tutorials vs user stories, etc. Took me a minute to find it, but here is what @ludwa6 originally posted in that same thread, which I think is spot on:

In any case, considering this GUT (Grand Unified Theory) of documentation, i would advocate for adopting its 4-square classification scheme for the different types of doc, i.e.:

  1. Tutorials
  2. How-To Guides
  3. Reference resources
  4. Explanations

However you might choose to implement it (tags, subdirectories, etc.), i think it is really helpful to be clear about the qualitative diffs across these 4 forms of doc, both in the authoring, and in the InfoArchitecture that should make them most easily accessible, depending on UserNeeds.

The key to this would be to have some tight restrictions on what we called those category, basically restrict it to an enumerable of type String, and only one of course, as opposed to tags which could be a list. That would allow us to group them into their own sections of the website in the main menu or filter by them in the main index of blog posts. It would also aid in maintenance for certain time-sensitive content.

Of course, that could be done simply with a different directory, or you could just filter against the date property, or like I suggested in the past, you could even take a more targeted approach by defining some Frontmatter properties to specify what version of a project a tutorial is meant to work with:

projects:
  - name: farmOS
    versions:
      - 2.0.0
      - 2.1.0
  - name: Field Kit
    versions:
      - 0.8.2
      - 2.0.0-alpha.1

The idea was this could achieve something like what DigitalOcean does in their tutorials:

Screenshot from 2022-10-31 13-35-56

So yea, no shortage of ways to skin that cat.

And just for reference if anyone wants to implement category or tags or any other Frontmatter properties, you just need to update the GraphQL schema here:

farmOS.org/gatsby-node.js

Lines 93 to 100 in a9f544e

type Frontmatter {
author: String
canonical: String
# Date is the only required (non-nullable) field.
date: Date! @dateformat
slug: String
title: String
}

More info on how to customize those types here:

https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization/

@mstenta
Copy link
Member Author

mstenta commented Oct 31, 2022

category was more the type or format of a post, rather than just descriptive keywords of the content

Yes! Good distinction. Maybe we can consider "tags" in the future too... but categories would probably be a good first step.

Love the other ideas you describe too @jgaehring!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blog Issues/requests pertaining to the farmOS community blog
Development

No branches or pull requests

2 participants