Hackorda Docs

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 .md under docs/ becomes a page. The folder is the section; the first # H1 (or a frontmatter title:) 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
---
ValueWho sees it
team (default — omit the field)any signed-in user
leadershipadmins 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

  1. Drop a .md file anywhere under docs/ (a new folder becomes a new section automatically).
  2. Optionally add permission: leadership frontmatter to restrict it.
  3. 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 — reads docs/, 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 sharing WikiArticle.
  • src/components/wiki/WikiSidebar.tsx — the nav.

On this page