feat(wiki): internal wikilinks with [[Page Name]] syntax #666
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 Name]]wikilink syntax to wiki pages, with support for display text, folder paths, and red links for non-existent pages.Current State
[text](url)syntax for internal linksProposed Syntax
[[Page Name]][[Page Name|Display Text]][[folder/Page Name]][[#Section]][[Page Name#Section]]Red Links
Pages that don't exist should render with a distinct style (red text, like Wikipedia), linking to the create page URL (
?action=_new&title=Page+Name). This helps wiki authors identify missing content.Implementation
Markdown Extension
modules/markup/markdown/that intercepts[[...]]patterns before standard markdown processing.wikilink-new) for red link stylingBackend
routers/web/repo/wiki.gorenderViewPage()— pass the page list to the render context so the wikilink renderer can check existenceGetTreeEntryByPath()for each linked pageFiles to Modify
modules/markup/markdown/routers/web/repo/wiki.goweb_src/css/.wikilink-newred link stylingWikipedia Parity
This is Wikipedia's signature feature —
[[internal links]]are the backbone of wiki navigation and content discovery.