---
description: How the ProperDocs site renders kb/ — the README-vs-index rule, the nav-generation hook, and the full inventory of reader landing pages (GitHub repo page, site home, per-collection landings) that positioning copy must keep consistent
type: types/note.md
tags: []
---

# Documentation site

The KB renders to a static ProperDocs site (`properdocs.yml`, `docs_dir: kb`), published to GitHub Pages by `.github/workflows/pages.yml`. This doc covers how pages and the nav are produced, and — the load-bearing part for anyone doing positioning or site work — the full set of reader **landing pages**, which is larger than it looks and easy to update incompletely.

## The README-vs-index rule

ProperDocs renders a directory's main page from either `index.md` or `README.md`:

- A file named `README.md` is treated as the directory index — it builds to `index.html` and is served at the directory URL. **So a directory with only a `README.md` renders that file as its main page.** Every `kb/<collection>/README.md` is therefore the rendered landing page for its collection.
- If a directory contains **both** `index.md` and `README.md`, they collide on the same output path; `index.md` wins, `README.md` is dropped from the build, and ProperDocs logs a warning.

This is why `kb/README.md` does **not** appear on the site: `kb/index.md` shadows it. `kb/README.md` survives only as a source-tree routing aid for agents reading the repo directly; if it ever needs to render, it must be renamed or merged into `kb/index.md`.

## Nav generation

The nav is generated, not hand-listed. `src/commonplace/docs/properdocs_hooks.py:on_config` walks the directories directly under `docs_dir` and adds a top-nav entry for each one that contains a `README.md`, pointing at that README. `Home` (fixed to `index.md`) leads the list and an external `GitHub` link ends it. `agentic-system-analyses/` and `agentic-systems/` share one `Agentic Systems` dropdown (the generated current-analyses list, each lens under `agentic-systems/comparisons/`, then the authored accounts); `agent-memory-systems/` and `types/` still build but have no menu entry; Reference links the types landing. Every top-level `COLLECTION.md`-bearing directory must provide that curated landing; `commonplace-validate landings` checks both its presence and the absence of a colliding `index.md`. Nothing in `properdocs.yml` lists collections.

`properdocs.yml` also carries a `redirect_maps` block (preserves external URLs across note renames; written by `commonplace-relocate-note`) and `exclude_docs`. The exclusion keeps generated reports, the ignored `kb/sources/.snapshots/` cache, and a few workshop fixtures out of the build. Ingest analyses under `kb/sources/` still render; their frontmatter retains source identity and the exact local-snapshot checksum without republishing the captured page. Content-collection `dir-index.md` and per-tag listing pages are generated at build time only (ADR 025), covered in [storage-architecture.md](./storage-architecture.md). Tag heads and directory landings publish the links to their generated listings in both HTML and Markdown. These navigation links are added to the build’s copy, not the checked-in source; the Markdown companion does not include HTML-only badges or workshop banners.

## Landing-page inventory

A reader can enter through any of these. They are distinct files with distinct jobs — positioning or identity copy changed in one is **not** changed in the others, which is the failure mode to guard against.

| Page | File | Role | On the site? |
|---|---|---|---|
| GitHub repo page | `/README.md` | Tool face: install, commands, layout, license. Outside `docs_dir`, so GitHub-only. | No (GitHub repo view) |
| Site home | `kb/index.md` | Content face: the rendered site's front door — positioning lede, theory threads, browse. Shadows `kb/README.md`. | Yes (`Home`) |
| Source routing doc | `kb/README.md` | Filesystem-contract routing for agents reading the source tree. Shadowed by `kb/index.md`. | No (dropped from build) |
| Collection landings | `kb/<collection>/README.md` (every top-level directory under `kb/` with a `COLLECTION.md`) | Each top-level collection's curated head and nav target; renders as the collection's main page. | Yes (top-level nav or dropdown per `properdocs_hooks.py`; `agent-memory-systems/` and `types/` build without a menu entry) |

The root `README.md` (tool face) and `kb/index.md` (content face) are kept as separate files deliberately: they serve different jobs, and `docs_dir: kb` puts the root README outside the docs tree, so a single shared homepage would require moving `docs_dir` or a symlink. Both should open with the same positioning lede and then diverge by job; the shared lede is short enough to sync by hand.

## See also

- [storage-architecture.md](./storage-architecture.md) — the build-time derived indexes and the ProperDocs site as a derived surface over authored markdown
- [Topic index](../tags/README.md) — browse the published KB by tag
