Documentation inventory (line counts)
Purpose
Section titled “Purpose”This inventory supports content planning and gap analysis: which pages are thin vs deep, and how the DocType reference dominates total line count.
Download
Section titled “Download”- Built site: docs-inventory.csv (from
public/docs-inventory.csv) - Repository:
docs/docs-inventory.csvat repo root
Format: CSV with header path,line_count. Paths are relative to the docs/ package (e.g. src/content/docs/...).
Regenerate locally
Section titled “Regenerate locally”From the docs/ directory:
find src/content/docs -type f \( -name '*.md' -o -name '*.mdx' \) | while read -r f; do printf '%s,%s\n' "$(wc -l < "$f" | tr -d ' ')" "$f"done | sort -n | awk -F, '{print $2","$1}' | { echo 'path,line_count'; cat; } > docs-inventory.csvcp docs-inventory.csv public/docs-inventory.csvCommit both files when the documentation set materially changes.
Verify (CI-friendly)
Section titled “Verify (CI-friendly)”From the docs/ directory:
npm run check:inventoryThis asserts docs-inventory.csv and public/docs-inventory.csv are identical and that every listed path exists. Optional strict mode also checks line counts match the CSV (run after regenerating the inventory):
npm run check:inventory:strictOrg-standard matrix (inventory)
Section titled “Org-standard matrix (inventory)”| Item | Value / note |
|---|---|
| Source of truth | docs/docs-inventory.csv |
| Published copy | docs/public/docs-inventory.csv → served as /docs-inventory.csv on the built site |
| Regeneration | Shell one-liner on this page — run from docs/ |
| PR / CI freshness | Run npm run check:inventory in docs/ after inventory or content changes; use check:inventory:strict when line counts must match |
| Automation owner | Decide per team (platform or docs maintainer) |
How to use
Section titled “How to use”| Use case | Action |
|---|---|
| Find shortest curated pages | Filter doctype-reference out; sort by line_count |
| Estimate doc effort | Sum lines by folder prefix |
| CI check | npm run check:inventory (existence + source/public match); check:inventory:strict for line-count drift |