Skip to content

Migrate to Zola 0.22 syntax highlighting (giallo)#49

Merged
micahkepe merged 7 commits intomainfrom
47-migrate-to-zola-022-syntax-highlighting-support
Feb 8, 2026
Merged

Migrate to Zola 0.22 syntax highlighting (giallo)#49
micahkepe merged 7 commits intomainfrom
47-migrate-to-zola-022-syntax-highlighting-support

Conversation

@micahkepe
Copy link
Copy Markdown
Owner

Summary

Closes #47.

  • Migrate syntax highlighting from syntect to giallo (Zola >=0.22): replace
    [markdown] highlight config with [markdown.highlighting], swap <link>
    tags to reference
    giallo-generated CSS, update toggle-theme.js to use media attribute
    toggling
  • Remove legacy assets: delete static/syntax/ (syntect CSS), remove
    reference-return.js (now handled natively by Zola's bottom_footnotes)
  • Update codeblock handling: detect language via data-lang attribute
    (giallo convention), add shellscript → Bash mapping, add giallo base styles
    and a specificity workaround
    for .z-punctuation
    (giallo#45)
  • Bump min_version to 0.22.0, update zola-deploy-action to v0.22.1
  • Add recommended Zola defaults (external_links_target_blank,
    external_links_no_referrer, external_links_external, lazy_async_image,
    github_alerts, error_on_missing_language, etc.)
  • Fix nav link layout with flexbox to prevent link collapsing
  • Fix light_theme from gruvbox-dark-medium to everforest-light
  • Update docs with new syntax highlighting setup, migration guide from
    v1.0.0, and Zola >=0.22 requirement notice

native

- Update `theme.toml` min_version of Zola to 0.22
- Remove now-obsolete `reference-return.js` script
- Comment out and leave TODOs for old code syntax highlighting logic
…>=0.22)

Replace syntect-based syntax highlighting with giallo, Zola's new
highlighting engine as of v0.22. This is a breaking change requiring
Zola >=0.22.

- Replace `[markdown]` `highlight_code`/`highlight_theme`/`highlight_themes_css`
  config with `[markdown.highlighting]` section (`style`, `dark_theme`,
  `light_theme`)
- Update `_base.html` to load giallo CSS with `prefers-color-scheme`
  media queries
- Update `toggle-theme.js` to swap giallo stylesheets via `media` attribute
- Update `codeblock.js` to read `data-lang` attribute for language detection
- Add giallo base styles (`.giallo-l`, `.giallo-ln`) to `_code.scss`
- Add workaround for giallo duplicate `.z-punctuation` rules (getzola/giallo#45)
- Remove old syntect-generated CSS files (`static/syntax/`)
- Enable `bottom_footnotes` for native Zola footnote backlinks
Prevents nav links from collapsing into a single run of text by
applying display:flex with a 1ch gap.
Add useful Zola defaults (sitemap, robots.txt, minify, external link
handling, lazy images, GitHub alerts). Remove verbose comments that
duplicate Zola docs, drop commented-out dead settings, and remove
explicitly-set defaults. Fix `light_theme` to use an actual light theme
("everforest-light") instead of "gruvbox-dark-medium".
@micahkepe micahkepe linked an issue Feb 8, 2026 that may be closed by this pull request
@micahkepe micahkepe merged commit 76aaf58 into main Feb 8, 2026
2 checks passed
@micahkepe micahkepe deleted the 47-migrate-to-zola-022-syntax-highlighting-support branch February 8, 2026 07:13
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.

Migrate to Zola ^0.22

1 participant