Add admin help system: build-embedded markdown docs + contextual help
#37 in Riparion/riparion-cms — merged 2026-06-02
What
An in-product help system for the admin, modeled on the Dioxus docsite's markdown-sourced docs — but deliberately lighter. Docsite uses build.rs codegen (mdbook-gen → generated BookRoute enums) and a build-time Stork full-text index; that pays off for a multi-version public docs site but is overkill for a bounded, project-owned admin doc set. This keeps the good ideas (markdown authoring, routed pages, search, embeddable live components) and reuses what riparion-cms already has.
How
- Content: static, build-embedded Markdown —
include_str!oversrc/pages/admin/help/content/*.mdplus a hand-maintainedHELP_ARTICLESregistry. Add an article by dropping a file and appending one line. - Rendering: articles go through the existing
mdx::parse_body+render_segmentspipeline, so they get.prosestyling for free and can host the same live[[/name …]]embeds authors use in posts. The Embeds & smart tags article mounts a live counter to demonstrate. - Routes:
/admin/help(searchable index, client-side substring filter over the embedded registry, grouped by section) and/admin/help/:slug(one article; not-found notice with a back-link for unknown slugs). Both wrapAdminShell. - Contextual help: a
?button in the admin header deep-links from each section to its article viahelp_route_for, falling back to the index for sections without one. - Permissions: the Help sidebar entry is gated non-restrictively (the dashboard's token) since help is read-only product docs.
- Breadcrumb: two new arms (the exhaustive match enforced this at compile time); the article crumb shows the real title.
No new CSS. Reuses render_markdown/mdx, AdminShell, the .prose styles, and the surface/text catalog components.
Initial articles: getting-started, posts, pages, embeds, media, comments.
Verification
cargo fmt --all --checkclean.- clippy
-D warnings-equivalent clean on server+sqlite, server+postgres (--all-targets), and the wasm/web target. No new warnings; the pre-existing wasm dead-code lints are in server-only code, unrelated to this change. - Manual end-to-end steps recorded locally (search filter, live embed in an article, bad-slug fallback, contextual
?deep-links, non-restrictive permission gate).
🤖 Generated with Claude Code
Last updated 2026-06-03
Links to this note
Merged pull requests, newest first.