AsciiDoc with Zensical¶
This page demonstrates AsciiDoc content rendered through the zensical-asciidoctor-backend module.
It showcases the HTML transformations that convert Asciidoctor output into Material-theme-compatible HTML.
Admonitions¶
Asciidoctor admonitions are transformed into Material Design admonition blocks.
Note
This is a note admonition. It provides helpful context.Tip
This is a tip admonition. Use it for best practices.Warning
This is a warning admonition. Proceed with caution.Important
This is an important admonition. Maps to Material’s "danger" style.Caution
This is a caution admonition. Maps to Material’s "warning" style.Code Blocks¶
Source code is rendered with syntax highlighting.
use zrx::module::{Module, Context, Result};
pub struct AsciiDoc {
config: Config,
}
impl Module for AsciiDoc {
fn setup(&self, ctx: &mut Context) -> Result { // (1)
let files = ctx.add::<FilePath>(); // (2)
let adoc_files = files.filter(|path: &FilePath| {
Ok(path.0.ends_with(".adoc"))
});
Ok(())
}
}-
The single entry point for module initialization
-
Creates a typed subscription to file path streams
Tables¶
Tables are wrapped with Material CSS classes for responsive styling.
| Component | Purpose | Crate |
|---|---|---|
Module trait |
Single setup method entry point |
zrx-module |
Context |
Runtime interaction API | zrx-module |
Stream |
Reactive data pipeline | zrx-stream |
Value trait |
Type marker for stream data | zrx-scheduler |
Images¶
Images are converted to HTML5 <figure> elements.
Cross-References¶
Cross-references between AsciiDoc pages are rewritten for directory-URL routing:
-
See Feature Showcase for more examples
-
Back to the home page
-
External link: Asciidoctor documentation
Lists¶
Ordered¶
-
Initialize the project with
zensical new -
Add AsciiDoc files to
docs/-
Create
.adocfiles in thedocs/directory -
Set document attributes (title, description)
-
-
Register the AsciiDoc module
-
Build with
zensical build-
Run
cargo run --example render_asciidoc -
Run
zensical build --clean
-
Unordered¶
-
Supports mixed AsciiDoc + Markdown sites
-
Full Material theme compatibility
-
Subprocess rendering via
asciidoctor -
Configurable attributes and safe mode
Definition List¶
- Renderer
-
Invokes Asciidoctor as a subprocess to convert
.adocfiles to raw HTML. - HtmlProcessor
-
Transforms Asciidoctor HTML output into Zensical-compatible markup.
- Config
-
Controls safe mode, attributes, and error handling for the rendering pipeline.