Internal Wiki
This wiki renders the repo's docs/ markdown corpus at /wiki, behind
Clerk auth. It's the self-hosted, internal counterpart to the public Mintlify
docs — same content philosophy (markdown in Git is the source of truth), but
gated and never indexed.
How it works
- Every
.mdunderdocs/becomes a page. The folder is the section; the first# H1(or a frontmattertitle:) is the page title. - Navigation is generated from the file tree — no hand-maintained nav list.
- Rendering is full GitHub-Flavored Markdown (tables, code blocks) via
remark+remark-gfm.
Access control
A page's visibility is set by a frontmatter permission: field:
---
permission: leadership # admins / super-admins only
---| Value | Who sees it |
|---|---|
team (default — omit the field) | any signed-in user |
leadership | admins and super-admins only |
Leadership pages are filtered at the input level — a non-admin never
receives them in their sidebar or via a direct URL (they 404). It's a genuine
withhold, not CSS hiding. Today roadmap.md and SESSION-HANDOFF.md are
marked leadership.
Adding a page
- Drop a
.mdfile anywhere underdocs/(a new folder becomes a new section automatically). - Optionally add
permission: leadershipfrontmatter to restrict it. - That's it — it appears in the wiki on next load. No nav edits.
Where it lives in the code
src/lib/wiki/content.ts— readsdocs/, builds the tree, applies the permission filter.src/lib/wiki/render.ts— markdown → HTML.src/app/wiki/— the gated route:layout.tsx,page.tsx(index),[...slug]/page.tsx(sub-pages), all sharingWikiArticle.src/components/wiki/WikiSidebar.tsx— the nav.