Skip to content

Documentation inventory (line counts)

This inventory supports content planning and gap analysis: which pages are thin vs deep, and how the DocType reference dominates total line count.

  • Built site: docs-inventory.csv (from public/docs-inventory.csv)
  • Repository: docs/docs-inventory.csv at repo root

Format: CSV with header path,line_count. Paths are relative to the docs/ package (e.g. src/content/docs/...).

From the docs/ directory:

Terminal window
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.csv
cp docs-inventory.csv public/docs-inventory.csv

Commit both files when the documentation set materially changes.

From the docs/ directory:

Terminal window
npm run check:inventory

This 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):

Terminal window
npm run check:inventory:strict
ItemValue / note
Source of truthdocs/docs-inventory.csv
Published copydocs/public/docs-inventory.csv → served as /docs-inventory.csv on the built site
RegenerationShell one-liner on this page — run from docs/
PR / CI freshnessRun npm run check:inventory in docs/ after inventory or content changes; use check:inventory:strict when line counts must match
Automation ownerDecide per team (platform or docs maintainer)
Use caseAction
Find shortest curated pagesFilter doctype-reference out; sort by line_count
Estimate doc effortSum lines by folder prefix
CI checknpm run check:inventory (existence + source/public match); check:inventory:strict for line-count drift