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

ENVIRONMENT

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

EXIT STATUS

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

BUGS

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

AUTHORS

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

RESOURCES

208       Project website: https://asciidoctor.org
209
210       Project documentation: https://docs.asciidoctor.org
211
212       Community chat: https://chat.asciidoctor.org
213
214       Source repository: https://github.com/asciidoctor/asciidoctor
215
216       Mailing list archive: https://discuss.asciidoctor.org
217

COPYING

219       Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and
220       the individual contributors to Asciidoctor. Use of this software is
221       granted under the terms of the MIT License.
222
223
224
225Asciidoctor 2.0.20                2018-03-20                    ASCIIDOCTOR(1)
Impressum