Commit Graph
497 Commits
Author SHA1 Message Date
Timothée Mazzucotelli 18b9fe78bb fix: cache autorefs data for cross-ref resolution across rebuilds (#805)
On a first build without cache, pages are built and cross-references resolved thanks to the autorefs data retrieved from the Python interpreter.

On a second build, if a page changed, the cache is not reused, so the page is rebuilt and cross-references within it must be resolved again, but if the target symbols were rendered in other, already cached pages, the Python interpreter doesn't hold the necessary data to resolve these cross-references.

We fix this by caching autorefs data. We still need to update the data retrieved from the cache with the data retrieved from the Python interpreter, to give precedence to autorefs data for pages that were rebuilt. This solution still has the issue that stale data is never removed from the cache (for example, symbols that were completely deleted from the sources and API docs).

Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-09 14:01:38 +02:00
Martin Donath 346cba79d8 chore: release v0.0.48
## Summary

This version updates the [user interface](https://github.com/zensical/ui) to [v0.0.21](https://github.com/zensical/ui/releases/tag/v0.0.21), bringing the latest fixes for Pyodide-powered code execution, search, and ANSI color rendering.

It also improves configuration parsing and defaults, and fixes relative and scoped cross-references for `mkdocstrings-python`.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
v0.0.48
2026-07-09 12:01:35 +02:00
Martin Donath 1f214129a9 chore: ignore error on buildx cache write
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-09 11:43:00 +02:00
Martin Donath cc688516e9 chore: release v0.0.48
## Summary

This version updates the [user interface](https://github.com/zensical/ui) to [v0.0.21](https://github.com/zensical/ui/releases/tag/v0.0.21), bringing the latest fixes for Pyodide-powered code execution, search, and ANSI color rendering.

It also improves configuration parsing and defaults, and fixes relative and scoped cross-references for `mkdocstrings-python`.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-08 21:37:45 +02:00
Martin Donath 15f138a908 fix: update ui to v0.0.21
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-08 21:23:09 +02:00
Martin Donath b340e4d0b2 Merge pull request #797 from zensical/refactor/cherry-pick-useful-bits-from-rust-config-refactor
refactor: cherry pick useful bits from rust config refactor
2026-07-07 18:02:24 +02:00
Timothée Mazzucotelli 63c9dd3db5 fix: avoid registering same extension twice (as plugin and extension)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 17:46:50 +02:00
Timothée Mazzucotelli 25ba4c7fa4 fix: enable autorefs when mkdocstrings extension is enabled
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 17:46:04 +02:00
Timothée Mazzucotelli ad57e7e180 chore: upgrade actions/checkout in bootstrapped workflow
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 17:10:00 +02:00
Timothée Mazzucotelli 81596c18f4 fix: fix relative/scoped cross-refs support for mkdocstrings-python (#796)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 14:32:37 +00:00
Timothée Mazzucotelli d4a3a7b524 chore: update Cargo.lock file
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 14:26:28 +00:00
Timothée Mazzucotelli a58c38707b chore: prepare UI in CI
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 15:55:50 +02:00
Timothée Mazzucotelli bf084fc3c6 chore: add configuration testing
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 15:42:43 +02:00
Timothée Mazzucotelli 781305a401 fix: support theme being just a string
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 15:42:30 +02:00
Timothée Mazzucotelli c33d65b0f8 fix: support enabled option in autorefs, glightbox and macros extensions
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 15:41:55 +02:00
Timothée Mazzucotelli 71c976cd96 refactor: allow configuring mkdocstrings as a Markdown extension
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 14:44:30 +02:00
Timothée Mazzucotelli cf0531028a chore: allow compiling/running tests calling into Python
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-07 12:27:33 +02:00
Martin Donath aa1e93c7fc chore: release v0.0.47
## Summary

This release adds native support for [markdown-exec](https://github.com/pawamoy/markdown-exec), improves compatibility around generated URLs and project configuration, and updates the user interface to `v0.0.20`.

Zensical now supports [markdown-exec], an MkDocs plugin that executes Python code blocks during the build and injects the result into the rendered page. In practice, this makes it easier to build interactive technical documentation, generated examples, and executable snippets that integrate directly with the theme in both `classic` and `modern` variants.

Additionally, the [user interface](https://github.com/zensical/ui) is updated to [v0.0.20](https://github.com/zensical/ui/releases/tag/v0.0.20), which includes client-side support for `markdown-exec` and several styling and interaction fixes. Mermaid diagram colors are now applied correctly for sequence numbers and activations, flow chart arrows, and state diagram arrows. Search filter scrollbars no longer overlap selectable items, and images using `data-gallery` are attributed correctly again.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
v0.0.47
2026-07-05 17:43:30 +02:00
squidfunk e071bb6cf6 fix: close connection on fatal write errors
Thanks to Sinan Polat for reporting the issue and providing a clear analysis and proof of concept.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-05 17:32:54 +02:00
Martin Donath b2eaab3bd3 chore: shim for markdown-exec not executing
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-05 17:19:45 +02:00
Martin Donath a6477371ca fix: update ui to v0.0.20
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-05 17:08:29 +02:00
Timothée Mazzucotelli 05856add19 feature: support markdown-exec plugin
Since markdown-exec is not a proper Markdown extension but just a collection of custom superfences for the pymdownx.superfences extension, we cannot directly parametrize it to disable a few things that Zensical doesn't need (compared to MkDocs). We can't make it a proper extension because it modifies the configuration of superfences, hence requiring to run before it in all cases, order which we cannot guarantee since users could enable it themselves as a Markdown extension and after superfences.

To instruct markdown-exec that it runs through Zensical, we set a global variable in its top-level module. This requires that a new version of markdown-exec is published to take it into account when deciding whether to inject assets when rendering Pyodide fences, that Zensical provides natively (contrary to MkDocs).

Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-05 17:00:58 +02:00
Timothée Mazzucotelli 35c8e3637f fix: fix check for appending iframe-worker polyfill (#785)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-04 13:41:02 +00:00
Timothée Mazzucotelli 7158eab75a fix: catch misconfiguration of site_dir and docs_dir (#780)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-03 11:56:58 +02:00
Martin Donath 30afc96725 fix: percent-encode & in URLs used in templates and sitemap (#772)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-25 11:36:07 +02:00
Martin Donath c76960ef08 chore: release v0.0.46
## Summary

This version improves search result quality and includes several bug fixes and refactorings.

### Search excerpts

Search results now include excerpts, making it easier to understand why a result matches. Search remains fully client-side and as fast as before, even for projects with thousands of pages. We still consider search an active area of iteration and expect to further improve it and expose more configuration options over time.

### User interface

The [user interface] is updated to [v0.0.19], which includes several navigation and interaction fixes. Search highlighting now ignores single-character tokens, which avoids noisy matches like highlighting every `e` for queries such as `e-mail`. Instant previews now include a hover bridge so moving the cursor from a link to the tooltip no longer drops the popup across the visual gap.

[user interface]: https://github.com/zensical/ui
[v0.0.19]: https://github.com/zensical/ui/releases/tag/v0.0.19

Dependencies were also updated, including TypeScript 6 and SVGO 4 compatibility adjustments. 83 new icons were added, 2 icons were removed, and 19 icons were modified. The Lucide icon set was updated to version v1.21.0.

### Validation defaults

The validation options `unresolved_references`, `unresolved_footnotes`, `unused_definitions`, `unused_footnotes`, `shadowed_definitions`, and `shadowed_footnotes` are now disabled by default. These checks remain available when explicitly enabled, but they have proven too unstable in edge cases with the current reference parser. They will eventually be superseded by the higher-fidelity parser that is already used by [Zensical Studio] and is planned for Open Source release and later integration into Zensical.

[Zensical Studio]: https://zensical.org/studio/

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
v0.0.46
2026-06-21 20:46:18 +02:00
Martin Donath 5533aba5d9 Merge pull request #761 from zensical/chore/update-ui
chore: update ui to v0.0.19
2026-06-21 20:31:01 +02:00
squidfunk aeb31ad28e fix: update ui to v0.0.19
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-21 20:27:03 +02:00
squidfunk fb4637cbcd chore: update .mono.toml to account for configuration changes
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-21 20:25:50 +02:00
squidfunk 61b6d05b68 fix: preserve small tags in generated search index
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-21 20:24:47 +02:00
Martin Donath edb0878fb5 fix: search path segment is empty when title is sourced from section index page
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-21 16:29:32 +02:00
Martin Donath e4a370f28d refactor: change several validation defaults to false (#758)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-21 15:58:05 +02:00
Timothée Mazzucotelli 909f97368c fix: don't crash on invalid URLs in HTML (#755)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-06-19 11:03:49 +00:00
Timothée Mazzucotelli e6b55fe6c6 fix: strip images from toc labels (#749)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-06-13 10:24:19 +00:00
Martin Donath 0f11c7fe99 fix: update pyo3 to 0.29.0 to mitigate 2 vulnerabilities
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-13 11:56:13 +02:00
Martin Donath 4cd38f3a0c chore: release v0.0.45
## Summary

This version reverts a behavior change in link validation that was introduced in 0.0.44 which is causing false positives.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
v0.0.45
2026-06-09 13:16:32 +02:00
Martin Donath 8318158c71 chore: workflow cleanup
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-09 11:54:18 +02:00
Timothée Mazzucotelli 8d9536adf8 fix: revert "fix: brackets in indented code blocks recognized as unresolved link references (#700)" (#735)
This reverts commit c40f649f7b, as it was causing more issues with reference-style links, for example https://github.com/zensical/zensical/issues/735. Proper fixes will land later.

Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-06-05 13:31:56 +00:00
Martin Donath 35ff260bcd chore: update dependencies (#733)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-04 19:50:16 +02:00
Martin Donath c7fe3e78a5 chore: release v0.0.44
## Summary

This version fixes several bugs related to link validation and macros, and ensures that dotfiles are not removed from the site directory during generation.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
v0.0.44
2026-06-04 19:20:35 +02:00
Martin Donath 033da3cb02 Merge pull request #731 from zensical/fix/validation
fix: snippet markers recognized as unresolved link references (#700)
2026-06-04 19:18:05 +02:00
squidfunk fe04446967 chore: make ruff happy
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-04 19:16:03 +02:00
squidfunk eb7211503c fix: ignore Markdown comments [//]: ... during link validation
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-04 19:07:40 +02:00
squidfunk a4866d0fa6 chore: make ruff happy
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-04 19:03:03 +02:00
squidfunk c40f649f7b fix: brackets in indented code blocks recognized as unresolved link references (#700)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-04 18:59:54 +02:00
squidfunk 93cc869978 fix: snippet markers recognized as unresolved link references (#700)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-06-04 18:38:01 +02:00
Timothée Mazzucotelli a212c59578 fix: don't remove dotfiles from site dir (#728)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-06-03 10:39:18 +00:00
Timothée Mazzucotelli db1f19c4ae fix: provide conf attribute in macros' env object
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-25 09:16:54 +00:00
Timothée Mazzucotelli 76222a8b2a chore: fix agent doctests, run cargo test in CI
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-24 16:43:14 +00:00
Timothée Mazzucotelli 9b452cbb68 fix: improve error message when missing icon is used (#708)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-24 16:40:57 +00:00