Warning
Please update to v0.0.36 – this version is missing some changes to the user interface for the new features.
Summary
This version adds native support for GLightbox, a JavaScript lightbox library to add zoom and gallery features to images. Images can be automatically annotated with the new glightbox Markdown extension. Add the following to zensical.toml:
[project.markdown_extensions.zensical.extensions.glightbox]Note
In order to integrate with configuration in mkdocs.yml, where GLightbox is implemented as a plugin, a compatibility shim is included, so no re-configuration is necessary if you're already using the plugin. Note that our extension is more efficient and faster than the plugin, as it does not re-parse the entire HTML of each page, but instead uses Python Markdown's native extension API.
HTML in the table of contents
Additionally, section titles in the table of contents will now render with HTML markup, so you can use emojis and other inline features in section titles and have them render correctly in the table of contents. In Material for MkDocs, this functionality was implemented with the typeset plugin. Zensical now supports this natively.
Relative links in raw HTML
Relative links in raw HTML are now correctly resolved. Initially, we carried over the link processing and resolution logic from MkDocs, which does not support relative links in raw HTML to this day. We implemented a Python Markdown postprocessor, to ensure that relative links in raw HTML are handled as well.
Changelog
Features
- 5519730 zensical, compat – render section title with markup in table of contents
- db8518d compat – add plugin compatibility shim for
glightbox - 057da7c compat – add support for image galleries using
glightbox(#290)
Bug fixes
- 64f3f33 compat – relative links in raw HTML not correctly resolved (#258)
- 87abb2a compat – remove
imgattributes moved to parent inGLightboxExtension - f7531af compat – images in raw HTML are double-processed by
GLightboxExtension - 1d8dc83 compat – ensure
Noneattributes are not added byGlightboxExtension - 773fa76 zensical – support uv's symlink mode (#557)
Refactorings
- 7c977a8 compat – move
GLightboxextension to regularPostprocessor