Package org.asciidoctor
Class OptionsBuilder
java.lang.Object
org.asciidoctor.OptionsBuilder
-
Method Summary
Modifier and TypeMethodDescriptionasMap()Deprecated.attributes(Map<String, Object> attributes) Deprecated.Useattributes(Attributes)instead.attributes(Attributes attributes) Sets attributes used for rendering input.attributes(AttributesBuilder attributes) Deprecated.Useattributes(Attributes)instead.Sets backend option.Sets base dir for working directory.build()Returns a valid Options instance.catalogAssets(boolean catalogAssets) If true, tells the parser to capture images and links in the reference table.compact(boolean compact) Compact the output removing blank lines.destinationDir(File destinationDir) Destination output directory.Sets doctype option.Sets eruby implementation.get()Deprecated.Usebuild()instead.headerFooter(boolean headerFooter) Sets header footer attribute.inPlace(boolean inPlace) Sets in place attribute.mkDirs(boolean mkDirs) Sets if asciidoctor should create output directory if it does not exist or not.Sets a custom or unlisted option.static OptionsBuilderoptions()Deprecated.UseOptions.builder()instead.parse(boolean parse) If true, the source is parsed eagerly (i.e., as soon as the source is passed to the load or load_file API).parseHeaderOnly(boolean parseHeaderOnly) Sets parse header only falg.Sets the safe mode.Source directory.sourcemap(boolean sourcemap) Keeps track of the file and line number for each parsed block.templateCache(boolean templateCache) Sets if Asciidoctor should use template cache or not.templateDir(File templateDir) Deprecated.UsetemplateDirs(File...)instead.templateDirs(File... templateDirs) Sets template directories.templateEngine(String templateEngine) Sets the template engine.Sets to dir value.toFile(boolean toFile) Sets to file value.Sets to file value.toStream(OutputStream toStream)
-
Method Details
-
options
Deprecated.UseOptions.builder()instead.Creates options builder instance.- Returns:
- options builder instance.
-
backend
Sets backend option.- Parameters:
backend- value.- Returns:
- this instance.
-
docType
Sets doctype option.- Parameters:
docType- value.- Returns:
- this instance.
-
inPlace
Sets in place attribute.- Parameters:
inPlace- value.- Returns:
- this instance.
-
templateDir
Deprecated.UsetemplateDirs(File...)instead.Sets template directory.- Parameters:
templateDir- directory where templates are stored.- Returns:
- this instance.
-
templateDirs
Sets template directories.- Parameters:
templateDirs- directories where templates are stored.- Returns:
- this instance.
-
templateEngine
Sets the template engine.- Parameters:
templateEngine- used to render the document.- Returns:
- this instance.
-
templateCache
Sets if Asciidoctor should use template cache or not.- Parameters:
templateCache- true if template cache is required, false otherwise.- Returns:
- this instance.
-
attributes
Deprecated.Useattributes(Attributes)instead.Sets attributes used for rendering input.- Parameters:
attributes- map.- Returns:
- this instance.
-
attributes
Sets attributes used for rendering input.- Parameters:
attributes- map.- Returns:
- this instance.
-
attributes
Deprecated.Useattributes(Attributes)instead.Sets attributes used for rendering input.- Parameters:
attributes- builder.- Returns:
- this instance.
-
toFile
Sets to file value. This toggles writing output to a file or returning output as a string. If writing to a string, the header and footer are omitted from the output by default.- Parameters:
toFile-trueto write output to a file,falseto write output to a string.- Returns:
- this instance.
-
toFile
Sets to file value. This is the destination file name.- Parameters:
toFile- name of output file.- Returns:
- this instance.
-
toStream
-
toDir
Sets to dir value. This is the destination directory.- Parameters:
directory- where output is generated.- Returns:
- this instance.
-
mkDirs
Sets if asciidoctor should create output directory if it does not exist or not.- Parameters:
mkDirs- true if directory must be created, false otherwise.- Returns:
- this instance.
-
safe
Sets the safe mode.- Parameters:
safeMode- to run asciidoctor.- Returns:
- this instance.
-
sourcemap
Keeps track of the file and line number for each parsed block. (Useful for tooling applications where the association between the converted output and the source file is important).- Parameters:
sourcemap- value.- Returns:
- this instance.
-
eruby
Sets eruby implementation.- Parameters:
eruby- implementation.- Returns:
- this instance.
-
catalogAssets
If true, tells the parser to capture images and links in the reference table. (Normally only IDs, footnotes and indexterms are included). The reference table is available via the references property on the document AST object. (Experimental).- Parameters:
catalogAssets- value.- Returns:
- this instance.
-
compact
Compact the output removing blank lines.- Parameters:
compact- value.- Returns:
- this instance.
-
parse
If true, the source is parsed eagerly (i.e., as soon as the source is passed to the load or load_file API). If false, parsing is deferred until the parse method is explicitly invoked.- Parameters:
parse- value.- Returns:
- this instance.
-
parseHeaderOnly
Sets parse header only falg.- Parameters:
parseHeaderOnly- value.- Returns:
- this instance.
-
destinationDir
Destination output directory.- Parameters:
destinationDir- destination directory.- Returns:
- this instance.
-
sourceDir
Source directory. This must be used alongsidedestinationDir(File).- Parameters:
srcDir- source directory.- Returns:
- this instance.
-
option
Sets a custom or unlisted option.- Parameters:
option- name.value- for given option.- Returns:
- this instance.
-
baseDir
Sets base dir for working directory.- Parameters:
baseDir- working directory.- Returns:
- this instance.
-
asMap
Deprecated.Usebuild()instead.Gets a map with configured options.- Returns:
- map with all options. By default an empty map is returned.
-
get
Deprecated.Usebuild()instead. -
build
Returns a valid Options instance.- Returns:
- options instance.
-
build()instead.