ASCIIDOCTOR(1)
π ASCIIDOCTOR(1) π
okay bestie, welcome to the Asciidoctor Manual β this is the manual page for asciidoctor(1), and yes we're gonna read it together, no skimming, because every single flag here is lowkey important π
β¨ NAME β¨
asciidoctor β converts AsciiDoc source files to HTML, DocBook, and other formats
πΈ SYNOPSIS πΈ
asciidoctor [OPTION]... FILE...
π¦ DESCRIPTION π¦
The asciidoctor(1) command takes your AsciiDoc source file(s) FILE and converts them into HTML5, DocBook 5, man(ual) page, and other custom output formats. it's giving conversion, it's giving range π
If FILE is - then the AsciiDoc source is read from standard input. yes, stdin, she's flexible like that β¨
π OPTIONS π
π Security Settings
-B,--base-dir=DIRβ the base directory that holds the document and its resources. Defaults to the directory containing the source file or, if the source is read from a stream, the working directory. When you combine it with the safe mode setting, you can use it to chroot the execution of the program. very main character energy π«Ά-S,--safe-mode=SAFE_MODEβ set the safe mode level:unsafe,safe,server, orsecure. This disables potentially dangerous macros in source files, likeinclude::[]β yes bestie, that one can be sketchy π. If you don't set it, the safe mode level defaults tounsafewhen Asciidoctor is invoked using this script.--safeβ sets the safe mode level tosafe. This enables include directives, but it prevents access to ancestor paths of the source file. It's provided for compatibility with theasciidoccommand. If not set, the safe mode level defaults tounsafewhen Asciidoctor is invoked using this script.
π Document Settings
-a,--attribute=ATTRIBUTEβ define, override, or unset a document attribute. Command-line attributes take precedence over attributes defined in the source file unless either the name or value ends in@. No substitutions are applied to the value.
ATTRIBUTE is normally formatted as a key-value pair, in the form NAME=VALUE. Alternate forms are NAME (where the VALUE defaults to an empty string), NAME! (unsets the NAME attribute), and NAME=VALUE@ (or NAME@=VALUE) (where VALUE does not override the NAME attribute if it's already defined in the source document). A value containing spaces must be enclosed in quotes, in the form NAME="VALUE WITH SPACES".
This option may be specified more than once. π
-b,--backend=BACKENDβ backend output file format:html5,docbook5, andmanpageare supported out of the box. You can also use the backend alias nameshtml(aliased tohtml5) ordocbook(aliased todocbook5). Other values can be passed, but if Asciidoctor cannot resolve the backend to a converter, it will fail β no cap. Defaults tohtml5.-d,--doctype=DOCTYPEβ document type:article,book,manpage, orinline. It sets the root element when using thedocbookbackend and the style class on the HTML body element when using thehtmlbackend. Thebookdocument type allows multiple level-0 section titles in a single document. Themanpagedocument type enables parsing of metadata necessary to produce a man page. Theinlinedocument type allows the content of a single paragraph to be formatted and returned without wrapping it in a containing element. Defaults toarticle. β¨
π Document Conversion
-D,--destination-dir=DIRβ destination output directory. Defaults to the directory containing the source file or, if the source is read from a stream, the working directory. If specified, the directory is resolved relative to the working directory.-E,--template-engine=NAMEβ template engine to use for the custom converter templates. The gem with the same name as the engine will be loaded automatically. This name is also used to build the full path to the custom converter templates. If a template engine is not specified, it will be auto-detected based on the file extension of the custom converter templates found. π§-e,--embeddedβ output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. This option is useful for producing documents that can be inserted into an external template. so handy fr fr π«Ά-I,--load-path=DIRECTORYβ add the specified directory to the load path, so that-rcan load extensions from outside the default Ruby load path. This option may be specified more than once.-n,--section-numbersβ auto-number section titles. Synonym for--attribute sectnums. cute and numbered, obsessed πΈ-o,--out-file=OUT_FILEβ write output to fileOUT_FILE. Defaults to the base name of the input file suffixed with backend extension. The file is resolved relative to the working directory. If the input is read from standard input or a named pipe (fifo), then the output file defaults to stdout. IfOUT_FILEis-, then the output file is written to standard output.-R,--source-dir=DIRβ source directory. Currently only used if the destination directory is also specified. Used to preserve the directory structure of files converted within this directory in the destination directory. If specified, the directory is resolved relative to the working directory.-r,--require=LIBRARYβ require the specified library before executing the processor, using the standard Rubyrequire. This option may be specified more than once.-s,--no-header-footerβ output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. This option is useful for producing documents that can be inserted into an external template.-T,--template-dir=DIRβ a directory containing custom converter templates that override one or more templates from the built-in set. (requires tilt gem)
If there is a subfolder that matches the engine name (if specified), that folder is appended to the template directory path. Similarly, if there is a subfolder in the resulting template directory that matches the name of the backend, that folder is appended to the template directory path.
This option may be specified more than once. Matching templates found in subsequent directories override ones previously discovered. π
π§ Processing Information
--failure-level=LEVELβ set the minimum logging level (default:FATAL) that yields a non-zero exit code (i.e., failure). If this option is not set, the program exits with a zero exit code even if warnings or errors have been logged. sneaky, but okay π-q,--quietβ silence application log messages and script warnings. shhh π€«--traceβ include backtrace information when reporting errors.-v,--verboseβ sets log level toDEBUGso application messages logged atINFOorDEBUGlevel are printed to stderr.-w,--warningsβ turn on script warnings (applies to executed code).-t,--timingsβ print timings report to stderr (time to read, parse, and convert). β±οΈ
π Program Information
-h,--help [TOPIC]β print a help message. Show the command usage ifTOPICis not specified or recognized. Dump the Asciidoctor man page (in troff/groff format) ifTOPICismanpage. Print an AsciiDoc syntax crib sheet (in AsciiDoc) ifTOPICissyntax. π-V,--versionβ print program version number.
-v can also be used if no source files are specified. π
π ENVIRONMENT π
Asciidoctor honors the SOURCE_DATE_EPOCH environment variable. If this variable is assigned an integer value, that value is used as the epoch of all input documents and as the local date and time. See https://reproducible-builds.org/specs/source-date-epoch/ for more information about this environment variable. reproducible builds bestie, we love her β¨
π¦ EXIT STATUS π¦
0β Success. slay π1β Failure (syntax or usage error; configuration error; document processing failure; unexpected error). π
π BUGS π
Refer to the Asciidoctor issue tracker at https://github.com/asciidoctor/asciidoctor/issues?q=is%3Aopen.
π AUTHORS π
Asciidoctor is led and maintained by Dan Allen and Sarah White and has received contributions from many individuals in the Asciidoctor community. The project was started in 2012 by Ryan Waldron based on a prototype written by Nick Hengeveld for the Git website. Jason Porter wrote the first implementation of the CLI interface provided by this command.
AsciiDoc.py was created by Stuart Rackham and has received contributions from many individuals in the AsciiDoc.py community. legends, all of them π«Ά
π§ RESOURCES π§
- Project website:
https://asciidoctor.org - Project documentation:
https://docs.asciidoctor.org - Community chat:
https://chat.asciidoctor.org - Source repository:
https://github.com/asciidoctor/asciidoctor - Mailing list archive:
https://discuss.asciidoctor.org
π COPYING π
Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor. Use of this software is granted under the terms of the MIT License.
okay bestie that's the whole thing, every flag, every path, every exit code, no skips π
and for the cute sign-off: this was Asciidoctor 2.0.26, dated 2018-03-20, and it's the ASCIIDOCTOR(1) manual β go convert something iconic, periodt β¨π
π¦
π¦ where this page comes from
- arch rolling: asciidoctor 2.0.26-1 Β· MIT
- fedora 43: rubygem-asciidoctor 2.0.26-1.fc43 Β· MIT
- fedora 44: rubygem-asciidoctor 2.0.26-2.fc44 Β· MIT
- nixos 26.05: asciidoctor 2.0.26
- nixpkgs unstable: asciidoctor 2.0.26
- ubuntu resolute: asciidoctor 2.0.26-2ubuntu2 Β· MIT
- ubuntu stonking: asciidoctor 2.0.26-2ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms