Asciidoctor

Asciidoctor is a fast text processor for converting AsciiDoc content to HTML5 format.

YAML Configuration

asciidoctor:

  • input:

    • Defaults to the repository root.
  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.5 CPU with 1920 MiB RAM.

  • options:

    Below is the list of supported options:

    -d, --doctype DOCTYPE            document type to use when converting document: [article, book, manpage, inline] (default: article)
        --safe                       set safe mode level to safe (default: unsafe)
                                     enables include directives, but prevents access to ancestor paths of source file
                                     provided for compatibility with the asciidoc command
    -S, --safe-mode SAFE_MODE        set safe mode level explicitly: [unsafe, safe, server, secure] (default: unsafe)
                                     disables potentially dangerous macros in source files, such as include::[]
    -s, --no-header-footer           suppress output of header and footer (default: false)
    -n, --section-numbers            auto-number section titles in the HTML backend; disabled by default
    -e, --eruby ERUBY                specify eRuby implementation to use when rendering custom ERB templates: [erb, erubis] (default: erb)
    -a, --attribute key[=value]      a document attribute to set in the form of key, key! or key=value pair
                                     unless @ is appended to the value, this attributes takes precedence over attributes
                                     defined in the source document
    -T, --template-dir DIR           a directory containing custom converter templates that override the built-in converter (requires tilt gem)
                                     may be specified multiple times
    -E, --template-engine NAME       template engine to use for the custom converter templates (loads gem on demand)
    -I, --load-path DIRECTORY        add a directory to the $LOAD_PATH
                                     may be specified more than once
    -r, --require LIBRARY            require the specified library before executing the processor (using require)
                                     may be specified more than once
        --failure-level LEVEL        set minimum logging level that triggers a non-zero exit code: [WARN, ERROR] (default: FATAL)
    

Examples

  • With asciidoctor set to default

    docstand:
      asciidoctor: default
    
  • With custom machine:

    docstand:
      asciidoctor:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
    
  • With customized asciidoctor

    docstand:
      asciidoctor:
        options:
          --safe:
          --section-numbers:
    

Index File Detection

Docstand automatically searches for index file (index.adoc or index.asciidoc) under your repository.

  • If an index file is found, then Docstand uses it to build the documentation.
  • Otherwise, Docstand generates a default index file at repository root and uses it to build the documentation.

results matching ""

    No results matching ""