Skip to content

Fix three build crashes: non-string titles, footnotes in headings, raster favicons - #425

Merged
oleeskild merged 1 commit into
mainfrom
fix/front-page-and-footnote-headings
Oct 13, 2026
Merged

oleeskild merged 1 commit into
mainfrom
fix/front-page-and-footnote-headings

Conversation

@oleeskild

@oleeskild oleeskild commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Three template bugs that failed garden builds during the 1.92.x fork sync:

  • Non-string note titles crash the front page (src/site/index.11tydata.js): a title like 2024 or a YAML date isn't a string, so the title comparison threw. Titles are now coerced with String(...).
  • Footnotes in headings crash the build (src/helpers/utils.js): namedHeadings rendered the heading's inline tokens without state.env, so markdown-it-footnote couldn't read env.docId. The heading is now rendered with the real env.
  • PNG/JPEG saved as favicon.svg crashes the build (src/site/normalize-favicon.js): raster images are now detected by their magic bytes (PNG, JPEG, GIF, WebP) and wrapped in an SVG with a data URI instead of being parsed as SVG.

…ster favicons

- index.11tydata.js: coerce note titles to strings before sorting/comparing,
  so a numeric or date title no longer crashes the front page.
- utils.js: render heading inline tokens with state.env so
  markdown-it-footnote finds env.docId when a heading contains a footnote.
- normalize-favicon.js: detect PNG/JPEG/GIF/WebP saved as favicon.svg and
  wrap them in an SVG with a data URI instead of failing the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017iXNomAvG3sXxCWaNSgNqZ
@oleeskild
oleeskild merged commit 6049beb into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant