galaxy-hub
galaxy-hub copied to clipboard
Replace "categories" with auto-tagging based on location.
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.
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:
- For pages automatically tagged, add another metadata property like "indexPage" or something.
- Just remove the back link and let pages add their own manually. It's not very popular anyway.
- 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.