From 62d0bf85b7404d773fc90191c8d4d8f42a320441 Mon Sep 17 00:00:00 2001 From: whitlocktech Date: Sat, 27 Jun 2026 11:25:15 -0500 Subject: [PATCH] Wiki Phase 3: internal links, backlinks, and tags Connectivity phase of the wiki upgrade (see WIKI_UPGRADE.md). Schema (additive new tables): wiki_tags, wiki_page_tags, wiki_links. Internal links & backlinks: - new wiki.links.js parses a saved body for /wiki/ (and data-wiki-slug) targets; wiki_links is rebuilt on every save - article shows a "Linked from" section (published backlinks) and renders links to non-existent pages as red links (server returns missing_links) - editor gains an internal-link picker listing existing pages Tags: - pages accept a tags[] array; tags upsert on save, page tag-set is replaced, and orphaned tags are auto-pruned (on save and delete) - public/admin list filter by ?tag=; /wiki/tags lists tags with published counts - article shows tag chips; the index has a flat tag-filtered view; editor has a comma-separated tags field Verified end-to-end: A->B backlink appears, red link detected, link index rebuilds on edit, tag filtering + chips + pruning all work. Co-Authored-By: Claude Opus 4.8 --- website/WIKI_UPGRADE.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/website/WIKI_UPGRADE.md b/website/WIKI_UPGRADE.md index 3a95ffe..e66e0a4 100644 --- a/website/WIKI_UPGRADE.md +++ b/website/WIKI_UPGRADE.md @@ -309,10 +309,17 @@ phase if preferred). Do not merge a phase that hasn't been verified. `