Commit Graph
157 Commits
Author SHA1 Message Date
Martin Donath b60354ccb3 chore: release v0.0.55
## Summary

This version fixes two false positives in the reference extractor and reverts Zensical's bootstrapped `zensical.toml` to TOML 1.0, since most editor tooling does not yet support TOML 1.1. Zensical understands both, TOML 1.0 and TOML 1.1, so this change does not affect the functionality of Zensical itself.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-08-16 12:12:40 +02:00
Martin Donath cfdf18f19b chore: release v0.0.54
## Summary

This version significantly reduces peak memory usage by 8–10×, making builds of large documentation projects substantially more efficient. It also improves reference validation by preventing false positives for links successfully resolved through autorefs.

Additionally, the [user interface](https://github.com/zensical/ui) is updated to [v0.0.25](https://github.com/zensical/ui/releases/tag/v0.0.25), fixing instant navigation for inline scripts and version aliases created with `mike`. This release also corrects `mike` configuration defaults and updates `webbrowser` to address a security vulnerability.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-08-13 17:48:51 +02:00
Timothée Mazzucotelli 34e6c89f4a performance: reduce peak memory usage by 8-10x
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-08-13 17:36:19 +02:00
Timothée Mazzucotelli db4f8ef5dc fix: avoid unresolved reference false-positive for autorefs
This commit fixes validation reporting false unresolved-reference errors for Markdown links that are successfully resolved by autorefs. Validation now runs after pages render, so it uses the autorefs results from the current build state and emits one complete issue report for that state.

**Validation implementation summary:**

- Page rendering now returns the identifiers that autorefs resolved, alongside rendered output.
- Validation combines those resolutions with the source-page references and anchors; a reference resolved by autorefs is no longer reported as unresolved.
- The workflow tracks a generation for page content and navigation, so it waits for matching render results from every page before creating issues. This prevents validation from using stale render data or printing duplicate reports during incremental updates.
- Reference collection now follows the configured documentation directory, and tests cover reporting after rendering and a subsequent clean rebuild.

Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-08-13 12:11:48 +00:00
Martin Donath 21824d2aec chore: release v0.0.53
## Summary

This version adds support for enabling strict mode directly in `mkdocs.yml` or `zensical.toml`, allowing warnings to fail builds consistently without the `--strict` command-line option. It also reduces memory usage by sharing cross-reference data between navigation clones.

Additionally, the user interface is updated to `v0.0.24`, improving search rendering for right-to-left languages and adding four new Lucide icons. The generated `zensical.toml` now uses TOML 1.1 syntax, and `pymdownx` is updated to version 11.0 to address a vulnerability.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-08-04 16:01:11 +02:00
Timothée Mazzucotelli 6227f4e52f feature: support strict configuration option (#840)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-08-04 12:03:32 +02:00
jonathan343 b36f50a2e0 performance: wrap autorefs in Arc to reduce memory usage (#838)
Signed-off-by: jonathan343 <jonathangee09@gmail.com>
2026-08-01 11:42:14 +02:00
Martin Donath bf07314a4d chore: release v0.0.52
## Summary

This version adds search support for CJK languages: Chinese, Japanese, and Korean. Search needs to segment text into individual words before it can index and match them. While many languages separate words with spaces, this is not consistently the case for CJK text, particularly Chinese and Japanese. Search now uses locale-aware segmentation to identify meaningful word boundaries, ensuring that content and queries are indexed and matched correctly.

Set the [site language](https://zensical.org/docs/setup/language/#site-language) to `zh`, `zh-Hant`, `zh-TW`, `ja`, or `ko` to enable segmentation.

The search modal is also larger, showing more results and context at once. Additionally, keyboard keys inside admonitions now use the correct background color in the modern theme.

Dependencies and development tooling were updated, including TypeScript 7. The build scripts now use `tsx` instead of `ts-node`, and `npm-run-all2` replaces the unmaintained `npm-run-all`. Updated icon packages add 56 new icons: 23 Font Awesome icons, 21 Lucide icons, 8 Octicons, and 4 Simple Icons.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-30 12:15:52 +02:00
Martin Donath f2d9ef8e6d feature: add CJK language support for search
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-30 12:08:51 +02:00
Martin Donath 362bf5d570 chore: release v0.0.51
## Summary

This version improves cached rebuilds by persisting `objects.inv` and autorefs data, fixes stale builds after removing files, and upgrades `soupsieve` to address vulnerabilities.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-17 19:57:19 +02:00
Martin Donath 7989a55dad Update dependencies
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-17 19:52:23 +02:00
Timothée Mazzucotelli ec69accd9d fix: cache objects.inv to persist it across cached rebuilds (#815)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-10 10:53:50 +00:00
Timothée Mazzucotelli 7e6940fdaf 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). The API would have to change a lot and often for it to have an impact though. Cleaning (`rm .cache/autorefs.json` or `zensical build --clean`) from time to time easily mitigates this.

Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-07-10 10:51:51 +00:00
Martin Donath 428d0d84de chore: release v0.0.50
## Summary
    
This version fixes a regression introduced in 0.0.48 which broke search.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-07-09 15:44:56 +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
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>
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 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>
2026-06-21 20:46:18 +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
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>
2026-06-09 13:16:32 +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>
2026-06-04 19:20:35 +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 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
squidfunk d7ccbe66a8 fix: anchors with escaped chars not matched during link validation (#703)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-22 09:39:16 +02:00
Martin Donath 7d2178a8a9 chore: release v0.0.43
## Summary

This version fixes further edge cases in link validation, and adds support for UTF-8 encoding with byte-order-marks.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-19 11:34:52 +02:00
Martin Donath 35a20425ac Merge pull request #697 from zensical/fix/validation-regressions 2026-05-19 11:31:52 +02:00
squidfunk 62a0feb8f4 fix: report path.md/#anchor as invalid during link validation (#690)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-19 11:20:04 +02:00
Timothée Mazzucotelli daafc8becb fix: filter out icons folder when watching theme directories (#693)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-18 10:50:54 +00:00
Timothée Mazzucotelli 913fd61670 fix: strip Byte-Order-Mark (BOM) from Markdown files (#687)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-17 15:34:55 +00:00
Martin Donath 7a141c5678 chore: release v0.0.42
## Summary

This version includes a number of bug fixes and refactorings to improve the stability and accuracy of link validation, and fixes a reload loop when the `custom_dir`, which is auto-watched, is explicitly added to `watch`. Moreover, GLightbox is now only downloaded when needed, which fixes an issue when using Zensical in air-gapped environments.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-15 12:11:25 +02:00
Martin Donath cdee1e8bc7 fix: disabling link validation doesn't disable link and reference collection (#659)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-15 11:38:52 +02:00
Timothée Mazzucotelli a5a864178c fix: only wait for config update after a first successful build (#670)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-13 09:45:21 +00:00
Timothée Mazzucotelli 65931820ba chore: incorporate autorefs
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-10 15:20:44 +00:00
Martin Donath 84adc6f290 chore: release v0.0.41
## Summary

This version adds support for [integrating tabular data] as Markdown tables, covering the functionality of the [mkdocs-table-reader-plugin], as well as the [`watch`][watch] option to automatically rebuild on changes in unmonitored files. Table reading is implemented as part of [macros], which we shipped in [0.0.40]. You can now embed CSV and other file formats with:

```
{{ read_csv("data/team.csv") }}
```

Additionally, the stability of link [validation] has been drastically improved, reducing the rate for false positives. We're working on support for validating links using [autorefs], which we'll provide in one of the next versions.

[integrating tabular data]: https://zensical.org/docs/setup/extensions/macros/#reading-tabular-data
[mkdocs-table-reader-plugin]: https://pypi.org/project/mkdocs-table-reader-plugin/
[macros]: https://zensical.org/docs/setup/extensions/macros/
[0.0.40]: https://github.com/zensical/zensical/releases/tag/v0.0.40
[validation]: https://zensical.org/docs/setup/validation/
[watch]: https://zensical.org/docs/setup/basics/#watch
[autorefs]: https://mkdocstrings.github.io/autorefs/

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-09 16:29:39 +02:00
Martin Donath bf26d1be5e refactor: implement parser for link validation
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-09 14:28:08 +02:00
Martin Donath bc3e017c30 chore: release v0.0.40
## Summary

This version adds support for [macros], covering the functionality of the `mkdocs-macros-plugin`. Macros allow you to define custom variables and functions that can be used in your Markdown files, making it easier to manage and reuse content across your documentation.

We've implemented macros support as a Python Markdown extension, since it's essentially a Markdown preprocessor that doesn't need to be aware of the rest of Zensical's rendering process, except for the current page and configuration. The benefit is that it can now also be used in Python docstrings to build API documentation with [mkdocstrings].

[macros]: https://zensical.org/docs/setup/extensions/macros/
[mkdocstrings]: https://mkdocstrings.github.io

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-04 17:49:13 +02:00
Timothée Mazzucotelli 91090e9917 refactor: combine file watching for extensions
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-04 12:05:41 +00:00
Timothée Mazzucotelli b2fdc788d4 refactor: pass rendering context into preprocessor
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2026-05-04 09:55:15 +00:00
Martin Donath 645bbe881a fix: clear site directory contents instead of removing it (#621)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-03 16:46:58 +02:00
squidfunk 814d2e9edf fix: link validation yields false positives on Windows (#616)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-03 12:39:09 +02:00
Martin DonathandtakeshiD b229bac9ad fix: zensical serve returns 404 after suspend (#574)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
Co-authored-by: takeshiD <goriponikeike55@gmail.com>
2026-05-01 20:08:37 +02:00
Martin Donath 0291ad5360 chore: release v0.0.39
## Summary

This version fixes several bugs related to link validation and lightbox configuration.

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-01 18:24:15 +02:00
Martin Donath 89d99bafaf Merge pull request #597 from zensical/fix/validation-text-fragment
fix: anchor not extracted from combined anchor-text-fragment
2026-05-01 18:02:52 +02:00
squidfunk 699d3be0f6 fix: add Python backtrace on Markdown rendering error
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-05-01 13:09:24 +02:00
squidfunk acc2620a57 fix: validation doesn't correctly map percent-encoded links (#598)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-04-30 17:33:54 +02:00
squidfunk 94f0d29756 fix: anchor not extracted from combined anchor-text-fragment
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
2026-04-30 15:31:21 +02:00