galaxyproject / galaxy-hub

Galaxy Community Hub
https://galaxyproject.org/
Other
99 stars 280 forks source link

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

Open NickSto opened 2 years ago

NickSto commented 2 years ago

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 commented 2 years ago

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.