Repository navigation
Foliate 0.12.0
Foliate 0.12.0 adds optional folding controls for h2 sections.
It also skips unchanged generated-asset uploads and validates the floating TOC setting as a boolean.
Foldable headings
Enable folding in .foliate/config.toml:
[build]
foldable_headings = trueThe default is false, preserving existing page behavior.
When enabled, each h2 with content gets a triangle button that folds everything up to the next h2 or h1, including subsections.
Sections start expanded.
The buttons support Enter and Space, and following a heading or TOC link opens the section containing its target.
All content remains visible without JavaScript and when printing.
Upgrading
Restart any running foliate watch process after upgrading so it loads the new Python code and configuration.
Sites with a custom .foliate/templates/layout.html need these lines in <head>, after the main stylesheet, to use the controls:
{% if foldable_headings %}
<link rel="stylesheet" href="/static/foldable-headings.css">
<script src="/static/foldable-headings.js" defer></script>
{% endif %}Foliate includes both assets in the build even when the site overrides main.css.
Generated-asset publishing
Foliate compares a manifest of generated assets and publisher configuration with the remote manifest before uploading.
An unchanged manifest skips the publisher command; a missing or unreadable remote manifest triggers a normal upload.
Validation
The release code passed 632 local tests.
Browser checks covered folding boundaries, keyboard controls, repeated fragment links, and yyiki's TOC and mobile layout.
Full Changelog: v0.11.2...v0.12.0