publish¶
Generate the Hugo/PaperMod report index and per-repo detail pages from the stored analyses.
It reads the latest analysis per repository from Postgres and writes Hugo content — an index page plus a per-repo detail page with a CRAP-score trend sparkline — into the output directory.
Flags¶
| Flag | Default | Description |
|---|---|---|
--out |
content/reports |
Hugo content output directory. |
--base-url |
(empty) | Blog base URL (reserved). |
--exclude-errors |
true |
Skip failed analyses in the report. |
Example¶
# write reports into the Hugo site's content tree
./go-crap-tracker publish --out pages/content/reports
# include failed analyses too
./go-crap-tracker publish --exclude-errors=false
Hugo requirement¶
The per-repo trend sparkline is inline SVG. For it to render, your Hugo config must allow raw HTML:
Output¶
<out>/
_index.md # report index — one row per repo, latest score + trend
<slug>/
_index.md # per-repo detail page with CRAP history sparkline
Related¶
- Repo Cache — the data that feeds these reports.
- HTTP API —
GET /api/reposreturns the same latest-per-repo data as JSON.