galaxy-hub icon indicating copy to clipboard operation
galaxy-hub copied to clipboard

Replace "categories" with auto-tagging based on location.

Open NickSto opened this issue 3 years ago • 1 comments

The categories feature was implemented mainly to avoid having to manually add, say, a "news" metadata property to the index.md of every news article. Instead, the system would recognize news articles like we do: based on where they're placed in the filesystem.

But I realized we don't need this additional abstraction. We already have something that'd serve this function: tags. Instead of defining "categories" in the config.json, we could define "autoTagDirs" (or something): directories whose contents will automatically be tagged. Then we can just filter by tag in dynamic pages.

NickSto avatar Jan 07 '22 17:01 NickSto

Oh and this would take away the automatic "← Back to [category index]" links that categorized pages get. But there's a few solutions for that:

  1. For pages automatically tagged, add another metadata property like "indexPage" or something.
  2. Just remove the back link and let pages add their own manually. It's not very popular anyway.
  3. Do some fancier back link that goes one tier up, or a multi-layered navigation bar that shows every page from root to your current one.

NickSto avatar Jan 07 '22 18:01 NickSto