Repository navigation
docs: organise the wiki into topic folders - #64
Merged
Merged
Conversation
docs/wiki was one flat directory of 33 pages, so a reader found a page by
remembering its file name and the only hierarchy was the sidebar. It is now one
folder per topic area:
concepts/ Core Concepts, Composition and Transforms
schemas/ one page per schema family, plus the rule catalogue
generator/ Source Generator, DataAnnotations, Diagnostics
serialization/ JSON Schema export and import, System.Text.Json, Newtonsoft
hosting/ Microsoft.Extensions.Validation, OpenAPI, Blazor, HttpClient,
dependency injection, localization
quality/ guarantees, performance, trimming/AOT, cross-platform interop
development/ Contributing, Release Flow
Every internal link (216) now resolves from the page that contains it - siblings
by file name, cross-folder through ../<folder>/ - and the sidebar lists each page
by its path from the wiki root, which is what the docs sync slugifies for page
order. Pages publish at /docs/zodsharp/<folder>/<page>/, so the address mirrors
the tree, and folder and file names stay letters/digits/dashes so no URL needs
percent-encoding.
Three pages stay at the root: Getting-Started.md is the site's landing page
(docs.rootPage), and Fluent-Schema-API.md and AspNetCore-Integration.md are the
two pages the site catalogue deep-links through docsPage, whose slug must be a
single path segment and must exist in both documentation channels.
Home.md and _Sidebar.md carry the same seven sections in the same order, and
Getting-Started.md - the page the site serves as the landing page - groups what
follows by the goal it serves. Contributing.md gains the tree, the URL rules and
a three-step recipe for adding a page; AGENTS.md records the constraint for the
next agent.
DocumentationWikiTests grew guards for the new shape: every page in a topic
folder, folders limited to the documented seven, the root pages unchanged, file
and folder names URL-safe, links resolved from the containing page, and no
page missing from the sidebar or the index.
Depends on purview-dev/purview-dev.github.io#52 (nested slugs, page-relative
links and docs.redirects), which also keeps every former flat URL alive.
Verified: dotnet test src/tests/Repository.UnitTests (9/9 DocumentationWikiTests),
csharpier check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
docs/wikiwas one flat directory of 33 pages, so a reader found a page by remembering its file name, and the only hierarchy was the sidebar. It is now one folder per topic area — and because the docs sync publishes a page's folder as part of its URL, the address mirrors the tree.The tree
Published at
/docs/zodsharp/<folder>/<page>/— e.g.schemas/Custom-Rules.mdis/docs/zodsharp/schemas/custom-rules/.Three pages stay at the root.
Getting-Started.mdis the site's landing page, andFluent-Schema-API.mdandAspNetCore-Integration.mdare the two pages the site catalogue deep-links throughdocsPage— that slug must be a single path segment and must exist in both documentation channels, so those two keep root-level URLs.What changed
git mv(history preserved); 216 internal links rewritten to resolve from the page that contains them — siblings by file name, cross-folder through../<folder>/._Sidebar.mdlists every page by its path from the wiki root (that is what the sync slugifies for page order), grouped into the same seven sections as before.Home.mdgained a section→folder table and per-section folder pointers;Getting-Started.md(the published landing page) groups what follows by the goal it serves.development/Contributing.mddocuments the tree, the URL rules (folder is part of the URL; names are letters/digits/dashes so nothing needs encoding; a move needs adocs.redirectsentry) and a three-step recipe for adding a page.AGENTS.md,README.mdand thepr.ymlcomments follow.Guards (
DocumentationWikiTests, 9 tests)Every page lives in a topic folder (folders limited to the documented seven); the root pages are exactly the three contract pages; every file and folder name is URL-safe; the sidebar lists each page exactly once and
Home.mdreaches every page; sections mirror between_Sidebar.mdandHome.md; every relative link resolves from the page that contains it; every page opens with a single#title. Mutation-tested: dropping a page, renaming a section, typo'ing a link, nesting a subfolder and addingURL Probe.mdeach fail with a message naming the file.Dependency
Merge purview-dev/purview-dev.github.io#52 first. It teaches the sync to keep a page's folder in its slug, resolve links page-relatively, and honour
docs.redirects; that PR also carries the 30-entry map that keeps every former flat URL alive (inert until the release that ships these folders is promoted tolive).Verification
dotnet test src/tests/Repository.UnitTests --treenode-filter '/*/*/DocumentationWikiTests/*'→ 9/9 passcsharpier check→ clean#fragmentpresent on its target, every slug URL-safe