feat(wiki): page categories via frontmatter #668
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add Wikipedia-style page categories using YAML frontmatter in wiki markdown files. Categories appear at the bottom of each page and link to auto-generated category index pages.
Design
Frontmatter Convention
Category Index Pages
/:owner/:repo/wiki/category/:namelisting all pages tagged with that categoryUI
WikiTree)Implementation
Backend
renderViewPage()before passing content to markdown renderer — strip frontmatter from rendered outputWikiCategory()that scans all.mdfiles in the wiki git repo, parses their frontmatter, and collects pages matching the requested categoryWikiCategories()handler for a master category list pageFiles to Modify
routers/web/repo/wiki.goWikiCategory(),WikiCategories()handlerstemplates/repo/wiki/view.tmpltemplates/repo/wiki/category.tmpl/wiki/category/:nameNo Database Required
Categories live in the markdown files themselves (git-native). This means wikis remain fully clonable and portable —
git clonegets you everything including metadata.Wikipedia Parity
Categories are one of Wikipedia's core organizational features, enabling content discovery and taxonomy across thousands of pages.