Added
Permission system
Quarkdown's permission system controls what a document can access during compilation, for increased safety.
If the compiler attempts an action that requires a permission it doesn't have, an error is raised.
You can grant or revoke permissions with the --allow and --deny flags:
quarkdown c main.qd --allow global-read --deny native-contentAvailable permissions: project-read (default), global-read, network, native-content (default), all. See the wiki page for more details.
Line continuation in function calls
A backslash (\) at the end of a line lets you split a function call's arguments across multiple lines.
This improves readability for calls with many parameters:
.container alignment:{center} \
background:{red} \
padding:{1px}
HTML static assets
A public/ directory in your project root lets you ship arbitrary files, such as robots.txt or CNAME, alongside the compiled output. Quarkdown copies the entire contents into the root of the output directory, preserving the original structure, without any processing.
HTML options, sitemap and canonical links
The new .htmloptions function configures HTML-specific generation settings. It accepts a baseurl parameter which, when set:
- Emits a
<link rel="canonical">tag in each page's<head>, pointing to the canonical URL of the root document or subdocument. - Generates a
sitemap.xmlwith absolute URLs for the root and all subdocuments, enabling search engine discovery.
.htmloptions baseurl:{https://quarkdown.com/wiki}
Keybindings
The new .keybinding {keys} function displays a keyboard shortcut as styled key labels.
Modifier keys are platform-aware: on macOS, they automatically display native symbols (e.g. ⌘ instead of Ctrl).
Press .keybinding {Mod+Shift+K} to delete the line.
Linked cross-references for all referenceable types
Cross-references (.ref) to figures, tables, code blocks, math equations, and custom numbered blocks are now rendered as clickable links that navigate to the referenced element. Previously, only heading references were linked.
Root path symbol (@) in links and images
When compiling to HTML, the @ symbol at the start of a URL resolves to the root of the output, where the main HTML file is located. This makes it easy to reference shared assets from any subdocument, particularly useful in combination with the new public/ directory.
[Home](@)
In the previous example, @/assets/logo.png resolves to ./assets/logo.png, which is where public/assets/logo.png is copied from the source to the output.
This @ symbol is internally called media passthrough prefix, as it prevents the media storage system from registering the path as a media reference, and instead treats it as a passthrough to be copied verbatim.
.image primitive function
The new .image function creates images with fine-grained control over their properties, including media storage opt-out. The mediastorage:{no} parameter lets an image reference a fixed relative path, useful in combination with the new public/ directory for shared assets.
.image {photo.jpg} label:{A photo} title:{A caption} width:{200px} mediastorage:{no}
Changed
Changed default output directory to ./quarkdown-output (breaking change)
The default output directory (--out) was changed from ./output to ./quarkdown-output to avoid conflicts and ambiguity. If you were relying on the old default, please update your workflow accordingly or compile with --out ./output explicitly.
Fully offline HTML output
HTML documents now render entirely offline. Assets such as fonts, opt-in libraries and code highlighting themes, are now bundled in the Quarkdown installation and copied to each generated document. Previously, the output relied on CDNs and Google Fonts, which meant that opening a document without an internet connection could lead to broken styling and missing features.
With this change, output directory size is larger, but it comes with more predictable rendering and significantly faster page loads. First-time compilations may take slightly longer due to the additional copying step, but subsequent compilation times should be unaffected thanks to checksum validation.
As before, opt-in libraries, such as Mermaid and KaTeX, are still only included if used in the document, so they don't affect performance or output size if not needed.
Note
Due to the excessive file size, Chinese-specific fonts (loaded from .doclang {zh}) are still loaded remotely.
Note
User-picked fonts from Google Fonts are still loaded remotely.
Parallel rendering
Rendering now runs in parallel across sibling elements, improving performance on large documents.
Static preview output file name (breaking change)
When launching with --preview (without --out-name), the output directory name no longer matches .docname, because its dynamic nature may easily break the preview. Instead, it's now preview-<mainfile>-<hash>.
In order to get the .docname-based output name, consider compiling without --preview.
Lightweight media storage IO
IO over the media storage system is now more lightweight and secure, as media files are now copied by reference rather than by content. Each media export now also comes with a checksum that's validated on subsequent exports to avoid unnecessary copying.
Renamed Injection stdlib module to Html
The Injection module, which contains functions related to raw HTML injection, was renamed to Html.
This change breaks previous references to the documentation of the module and its functions.
Fixed
Fixed live preview flashing with dark themes
Fixed an issue that caused live preview to display white flashes when using dark color themes, during the crossfade transition.
The transition background now matches the target's background color.
Fixed broken wiki links in Quarkdoc
Wiki links at /docs now correctly point to the new wiki.
Sponsors
Thanks to our sponsors! 🎉
