Skip to content

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(())
    }
}
  1. The single entry point for module initialization

  2. Creates a typed subscription to file path streams

Tables

Tables are wrapped with Material CSS classes for responsive styling.

Zensical Module API
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.

Figure 1. An orange kitten
An adorable orange kitten

Cross-References

Cross-references between AsciiDoc pages are rewritten for directory-URL routing:

Lists

Ordered

  1. Initialize the project with zensical new

  2. Add AsciiDoc files to docs/

    1. Create .adoc files in the docs/ directory

    2. Set document attributes (title, description)

  3. Register the AsciiDoc module

  4. Build with zensical build

    1. Run cargo run --example render_asciidoc

    2. 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 .adoc files to raw HTML.

HtmlProcessor

Transforms Asciidoctor HTML output into Zensical-compatible markup.

Config

Controls safe mode, attributes, and error handling for the rendering pipeline.