diff --git a/.prettierignore b/.prettierignore index 23d67fc..7c80f3e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,25 @@ node_modules/ yarn.lock + +# Site content. Measured, not assumed: formatting content/_index.md +# re-wrapped one list item, and the rendered public/index.html changed +# with it - the wrap landed as a literal newline between "7 PM at" and +# the following tag. HTML collapses that newline to a space, so the +# page looks the same, but the published bytes are not the same, and +# this content carries raw HTML blocks (div/span/br) that goldmark +# passes through verbatim because hugo.toml sets +# markup.goldmark.renderer.unsafe = true. A formatter that can silently +# change a published page is not worth the consistency, so content/ is +# formatted by hand. +content/ + +# Hugo layout templates. REPO_POLICIES.md puts HTML in prettier's +# scope, but these files are not HTML: they are Go templates carrying +# {{ define }}, {{ block }}, {{ .Content }} and +# {{ readFile ... | safeCSS }}. Prettier has no Go-template parser, so +# it would either fail outright or reflow the delimiters into markup +# Hugo can no longer parse. Formatting them would require an +# out-of-tree prettier plugin, which in turn requires a package.json - +# deliberately out of scope for this repo. Excluded on purpose, not by +# oversight. +themes/loravega/layouts/ diff --git a/TODO.md b/TODO.md index 34f8f9f..49a36ba 100644 --- a/TODO.md +++ b/TODO.md @@ -28,6 +28,25 @@ remaining policy scaffold is otherwise complete. # Completed Steps +- 2026-08-09: widened the prettier gate from top-level markdown to `'**/*.md'` + and `'**/*.css'` (closes #12). `themes/loravega/static/css/style.css` was + never formatted or gated even though it is inlined into every page; it is now + both, and the reformat landed as its own commit ahead of the script change so + no commit in the branch is red. `content/` is excluded in `.prettierignore`, + and that exclusion is measured rather than assumed: with `content/` in scope, + prettier re-wrapped one list item in `content/_index.md` and the rendered + `public/index.html` changed with it (the wrap became a literal newline between + `7 PM at` and the following ``). HTML collapses that newline to a space so + the page looks identical, but the published bytes are not, and this content + carries raw HTML that goldmark passes through verbatim under `unsafe = true`. + `themes/loravega/layouts/` is excluded too, with the reason recorded: those + files are Go templates, not HTML, and prettier has no parser for `{{ ... }}` — + covering them would need a plugin and therefore a `package.json`. Verified by + extracting `public/` from the built image before and after: with the final + scope, `index.html`, `index.xml` and `sitemap.xml` are byte-identical and only + the verbatim-copied `public/css/style.css` changes, in whitespace only — the + minified `