1ASCIIDOCTOR(1)                Asciidoctor Manual                ASCIIDOCTOR(1)
2
3
4

NAME

6       asciidoctor - converts AsciiDoc source files to HTML, DocBook, and
7       other formats
8

SYNOPSIS

10       asciidoctor [OPTION]... FILE...
11

DESCRIPTION

13       The asciidoctor(1) command converts the AsciiDoc source file(s) FILE to
14       HTML5, DocBook 5, man(ual) page, and other custom output formats.
15
16       If FILE is - then the AsciiDoc source is read from standard input.
17

OPTIONS

19   Security Settings
20       -B, --base-dir=DIR
21           Base directory containing the document and resources. Defaults to
22           the directory containing the source file or, if the source is read
23           from a stream, the working directory. When combined with the safe
24           mode setting, can be used to chroot the execution of the program.
25
26       -S, --safe-mode=SAFE_MODE
27           Set safe mode level: unsafe, safe, server, or secure. Disables
28           potentially dangerous macros in source files, such as include::[].
29           If not set, the safe mode level defaults to unsafe when Asciidoctor
30           is invoked using this script.
31
32       --safe
33           Set safe mode level to safe. Enables include directives, but
34           prevents access to ancestor paths of source file. Provided for
35           compatibility with the asciidoc command. If not set, the safe mode
36           level defaults to unsafe when Asciidoctor is invoked using this
37           script.
38
39   Document Settings
40       -a, --attribute=ATTRIBUTE
41           Define, override, or unset a document attribute. Command-line
42           attributes take precedence over attributes defined in the source
43           file unless either the name or value ends in @.
44
45           ATTRIBUTE is normally formatted as a key-value pair, in the form
46           NAME=VALUE. Alternate forms are NAME (where the VALUE defaults to
47           an empty string), NAME! (unsets the NAME attribute), and
48           NAME=VALUE@ (or NAME@=VALUE) (where VALUE does not override the
49           NAME attribute if it’s already defined in the source document).
50           Values containing spaces should be enclosed in quotes.
51
52           This option may be specified more than once.
53
54       -b, --backend=BACKEND
55           Backend output file format: html5, docbook5, and manpage are
56           supported out of the box. You can also use the backend alias names
57           html (aliased to html5) or docbook (aliased to docbook5). Other
58           values can be passed, but if Asciidoctor cannot resolve the backend
59           to a converter, it will fail. Defaults to html5.
60
61       -d, --doctype=DOCTYPE
62           Document type: article, book, manpage, or inline. Sets the root
63           element when using the docbook backend and the style class on the
64           HTML body element when using the html backend. The book document
65           type allows multiple level-0 section titles in a single document.
66           The manpage document type enables parsing of metadata necessary to
67           produce a man page. The inline document type allows the content of
68           a single paragraph to be formatted and returned without wrapping it
69           in a containing element. Defaults to article.
70
71   Document Conversion
72       -D, --destination-dir=DIR
73           Destination output directory. Defaults to the directory containing
74           the source file or, if the source is read from a stream, the
75           working directory. If specified, the directory is resolved relative
76           to the working directory.
77
78       -E, --template-engine=NAME
79           Template engine to use for the custom converter templates. The gem
80           with the same name as the engine will be loaded automatically. This
81           name is also used to build the full path to the custom converter
82           templates. If a template engine is not specified, it will be
83           auto-detected based on the file extension of the custom converter
84           templates found.
85
86       -e, --embedded
87           Output an embeddable document, which excludes the header, the
88           footer, and everything outside the body of the document. This
89           option is useful for producing documents that can be inserted into
90           an external template.
91
92       -I, --load-path=DIRECTORY
93           Add the specified directory to the load path, so that -r can load
94           extensions from outside the default Ruby load path. This option may
95           be specified more than once.
96
97       -n, --section-numbers
98           Auto-number section titles. Synonym for --attribute sectnums.
99
100       -o, --out-file=OUT_FILE
101           Write output to file OUT_FILE. Defaults to the base name of the
102           input file suffixed with backend extension. The file is resolved
103           relative to the working directory. If the input is read from
104           standard input or a named pipe (fifo), then the output file
105           defaults to stdout. If OUT_FILE is -, then the output file is
106           written to standard output.
107
108       -R, --source-dir=DIR
109           Source directory. Currently only used if the destination directory
110           is also specified. Used to preserve the directory structure of
111           files converted within this directory in the destination directory.
112           If specified, the directory is resolved relative to the working
113           directory.
114
115       -r, --require=LIBRARY
116           Require the specified library before executing the processor, using
117           the standard Ruby require. This option may be specified more than
118           once.
119
120       -s, --no-header-footer
121           Output an embeddable document, which excludes the header, the
122           footer, and everything outside the body of the document. This
123           option is useful for producing documents that can be inserted into
124           an external template.
125
126       -T, --template-dir=DIR
127           A directory containing custom converter templates that override one
128           or more templates from the built-in set. (requires tilt gem)
129
130           If there is a subfolder that matches the engine name (if
131           specified), that folder is appended to the template directory path.
132           Similarly, if there is a subfolder in the resulting template
133           directory that matches the name of the backend, that folder is
134           appended to the template directory path.
135
136           This option may be specified more than once. Matching templates
137           found in subsequent directories override ones previously
138           discovered.
139
140   Processing Information
141       --failure-level=LEVEL
142           Set the minimum logging level (default: FATAL) that yields a
143           non-zero exit code (i.e., failure). If this option is not set, the
144           program exits with a zero exit code even if warnings or errors have
145           been logged.
146
147       -q, --quiet
148           Silence application log messages and script warnings.
149
150       --trace
151           Include backtrace information when reporting errors.
152
153       -v, --verbose
154           Sets log level to DEBUG so application messages logged at INFO or
155           DEBUG level are printed to stderr.
156
157       -w, --warnings
158           Turn on script warnings (applies to executed code).
159
160       -t, --timings
161           Print timings report to stderr (time to read, parse, and convert).
162
163   Program Information
164       -h, --help [TOPIC]
165           Print a help message. Show the command usage if TOPIC is not
166           specified or recognized. Dump the Asciidoctor man page (in
167           troff/groff format) if TOPIC is manpage. Print an AsciiDoc syntax
168           crib sheet (in AsciiDoc) if TOPIC is syntax.
169
170       -V, --version
171           Print program version number.
172
173           -v can also be used if no source files are specified.
174

ENVIRONMENT

176       Asciidoctor honors the SOURCE_DATE_EPOCH environment variable. If this
177       variable is assigned an integer value, that value is used as the epoch
178       of all input documents and as the local date and time. See
179       https://reproducible-builds.org/specs/source-date-epoch/ for more
180       information about this environment variable.
181

EXIT STATUS

183       0
184           Success.
185
186       1
187           Failure (syntax or usage error; configuration error; document
188           processing failure; unexpected error).
189

BUGS

191       Refer to the Asciidoctor issue tracker at
192       https://github.com/asciidoctor/asciidoctor/issues?q=is%3Aopen.
193

AUTHORS

195       Asciidoctor is led and maintained by Dan Allen and Sarah White and has
196       received contributions from many individuals in the Asciidoctor
197       community. The project was started in 2012 by Ryan Waldron based on a
198       prototype written by Nick Hengeveld for the Git website. Jason Porter
199       wrote the first implementation of the CLI interface provided by this
200       command.
201
202       AsciiDoc.py was created by Stuart Rackham and has received
203       contributions from many individuals in the AsciiDoc.py community.
204

RESOURCES

206       Project website: https://asciidoctor.org
207
208       Project documentation: https://docs.asciidoctor.org
209
210       Source repository: https://github.com/asciidoctor/asciidoctor
211
212       Community chat: https://asciidoctor.zulipchat.com
213
214       Discussion list: https://discuss.asciidoctor.org
215

COPYING

217       Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and
218       the individual contributors to Asciidoctor. Use of this software is
219       granted under the terms of the MIT License.
220
221
222
223Asciidoctor 2.0.17                2022-01-05                    ASCIIDOCTOR(1)
Impressum