Package org.asciidoctor
Class AttributesBuilder
java.lang.Object
org.asciidoctor.AttributesBuilder
-
Method Summary
Modifier and TypeMethodDescriptionallowUriRead(boolean allowUriRead) Sets allow uri read attribute.appendixCaption(String appendixCaption) Sets appendix-caption label.Sets attributes in string form.Sets attributes in array form.asMap()Deprecated.Sets custom or unlisted attribute to the default value, empty string.Sets custom or unlisted attributeattributeMissing(String attributeMissing) Sets attribute missing attribute.static AttributesBuilderDeprecated.UseAttributes.builder()instead.static AttributesBuilderattributes(String arguments) Deprecated.UseAttributes.builder()witharguments(String)instead.static AttributesBuilderattributes(String[] arguments) Deprecated.UseAttributes.builder()witharguments(String...)instead.attributes(Map<String, Object> attributes) Adds all attributes.attributeUndefined(String attributeUndefined) Sets attribute undefined attribute.Sets backend attribue.build()Returns a valid Attributes instance.cacheUri(boolean cacheUri) Sets cache-uri flag.compatMode(CompatMode compatMode) Sets compat mode attribute.copyCss(boolean copyCss) Sets copy css attribute.dataUri(boolean dataUri) Sets data-uri attribute.Sets doc date for current document.Sets doc time for current document.Sets doc type attribute.experimental(boolean experimental) Sets experimental attribute.get()Deprecated.Usebuild()instead.hardbreaks(boolean hardbreaks) Sets hardbreaks at the end of each line.hiddenUriScheme(boolean hiddenUriScheme) Sets hide-uri-scheme flag.iconFontCdn(URI cdnUri) The URI prefix of the icon font; looks for minified CSS file based on iconfont-name value; used when iconfont-remote is seticonFontName(String iconFontName) The name of the stylesheet in the stylesdir to load (.css extension added automatically)iconFontRemote(boolean iconFontRemote) Enable icon font remote attribute.Sets which admonition icons to use.Sets icons directory location.ignoreUndefinedAttributes(boolean ignoreUndefinedAttributes) Sets ignore undefined flag so lines are kept when they contain a reference to a missing attribute.Sets image directory.linkAttrs(boolean linkAttrs) Sets linkattrs attribute.linkCss(boolean linkCss) Sets link css attribute.Sets local date for document.Sets local time for document.Sets math default engine.maxIncludeDepth(int maxIncludeDepth) Sets max include depth attribute.noFooter(boolean noFooter) Sets nofooter attribute.sectionNumbers(boolean sectionNumbers) Auto-number section titles in the HTML backend.sectNumLevels(int sectnumlevels) Sets sect num levels attribute.setAnchors(boolean setAnchors) Sets setanchor flag.showTitle(boolean showTitle) Sets showtitle value as an alias for notitle!skipFrontMatter(boolean skipFrontMatter) Skips front matter.sourceHighlighter(String sourceHighlighter) Sets source highlighter processor.sourceLanguage(String sourceLanguage) Source language attribute.Sets the styles dir.styleSheetName(String styleSheetName) Sets stylesheet name.tableOfContents(boolean toc) Sets if table of contents should be rendered or nottableOfContents(Placement placement) Sets table of contents attribute.tableOfContents2(Placement placement) Deprecated.Sets title of document.Unsets stylesheet name so document will be generated without style.untitledLabel(String untitledLabel) Sets the untitled label value.
-
Method Details
-
attributes
Deprecated.UseAttributes.builder()instead.Creates attributes builder.- Returns:
- attributes builder.
-
attributes
Deprecated.UseAttributes.builder()witharguments(String...)instead.Creates attributes builder.- Returns:
- attributes builder.
-
attributes
Deprecated.UseAttributes.builder()witharguments(String)instead.Creates attributes builder.- Returns:
- attributes builder.
-
sourceLanguage
Source language attribute.- Parameters:
sourceLanguage- value.- Returns:
- this instance.
-
skipFrontMatter
Skips front matter.- Parameters:
skipFrontMatter- value.- Returns:
- this instance.
-
ignoreUndefinedAttributes
Sets ignore undefined flag so lines are kept when they contain a reference to a missing attribute.- Parameters:
ignoreUndefinedAttributes- value.- Returns:
- this instance.
-
maxIncludeDepth
Sets max include depth attribute.- Parameters:
maxIncludeDepth- value.- Returns:
- this instance.
-
sectNumLevels
Sets sect num levels attribute.- Parameters:
sectnumlevels- value.- Returns:
- this instance.
-
attributeMissing
Sets attribute missing attribute. (Possible values skip, drop, drop-line)- Parameters:
attributeMissing- value.- Returns:
- this instance.
-
attributeUndefined
Sets attribute undefined attribute. (Possible values skip, drop, drop-line)- Parameters:
attributeUndefined- value.- Returns:
- this instance.
-
setAnchors
Sets setanchor flag.- Parameters:
setAnchors- value.- Returns:
- this instance.
-
untitledLabel
Sets the untitled label value.- Parameters:
untitledLabel- value.- Returns:
- this instance.
-
tableOfContents
Sets table of contents attribute.- Parameters:
placement- where toc is rendered.- Returns:
- this instance.
-
tableOfContents2
Deprecated.Sets table of contents 2 attribute.- Parameters:
placement- where toc is rendered.- Returns:
- this instance.
-
allowUriRead
Sets allow uri read attribute.- Parameters:
allowUriRead- value.- Returns:
- this instance.
-
backend
Sets backend attribue.- Parameters:
backend- value.- Returns:
- this instance.
-
showTitle
Sets showtitle value as an alias for notitle!- Parameters:
showTitle- value.- Returns:
- this instance
-
title
Sets title of document.- Parameters:
title- for document.- Returns:
- this instance.
-
docType
Sets doc type attribute.- Parameters:
docType- value.- Returns:
- this instance.
-
imagesDir
Sets image directory.- Parameters:
imagesDir- location.- Returns:
- this instance.
-
sourceHighlighter
Sets source highlighter processor. It should be supported by asciidoctor.- Parameters:
sourceHighlighter- name of the source highlighting library (e.g., coderay).- Returns:
- this instance.
-
localDate
Sets local date for document.- Parameters:
date-- Returns:
- this instance.
-
localTime
Sets local time for document.- Parameters:
time-- Returns:
- this instance.
-
docDate
Sets doc date for current document.- Parameters:
date-- Returns:
- this instance.
-
docTime
Sets doc time for current document.- Parameters:
time-- Returns:
- this instance.
-
tableOfContents
Sets if table of contents should be rendered or not- Parameters:
toc- value- Returns:
- this instance.
-
styleSheetName
Sets stylesheet name.- Parameters:
styleSheetName- of css file.- Returns:
- this instance.
-
unsetStyleSheet
Unsets stylesheet name so document will be generated without style.- Returns:
- this instance.
-
stylesDir
Sets the styles dir.- Parameters:
stylesDir- directory.- Returns:
- this instance.
-
linkCss
Sets link css attribute.- Parameters:
linkCss- true if css is linked, false if css is embedded.- Returns:
- this instance.
-
copyCss
Sets copy css attribute.- Parameters:
copyCss- true if css should be copied to the output location, false otherwise.- Returns:
- this instance.
-
icons
Sets which admonition icons to use. Attributes.IMAGE_ICONS constant can be used to use the original icons with images or Attributes.FONT_ICONS for font icons (font-awesome).- Parameters:
icons- value.- Returns:
- this instance.
-
iconFontRemote
Enable icon font remote attribute. If enabled, will use the iconfont-cdn value to load the icon font URI; if disabled, will use the iconfont-name value to locate the icon font CSS file- Parameters:
iconFontRemote- true if attribute enabled false otherwise.- Returns:
- this instance.
-
iconFontCdn
The URI prefix of the icon font; looks for minified CSS file based on iconfont-name value; used when iconfont-remote is set- Parameters:
cdnUri- uri where css is stored.- Returns:
- this instance.
-
iconFontName
The name of the stylesheet in the stylesdir to load (.css extension added automatically)- Parameters:
iconFontName- stylesheet name without .css extension.- Returns:
- this instance.
-
iconsDir
Sets icons directory location.- Parameters:
iconsDir- location.- Returns:
- this instance.
-
dataUri
Sets data-uri attribute.- Parameters:
dataUri- true if images should be embedded, false otherwise.
-
attribute
Sets custom or unlisted attribute to the default value, empty string.- Parameters:
attributeName- A flag-only attribute, such as "icons"- Returns:
- this instance.
-
sectionNumbers
Auto-number section titles in the HTML backend.- Parameters:
sectionNumbers- true if numbers should be autonumbered, false otherwise.- Returns:
- this instance.
-
hardbreaks
Sets hardbreaks at the end of each line.- Parameters:
hardbreaks- true if each line should be added a hardbreak, false otherwise.- Returns:
- this instance.
-
cacheUri
Sets cache-uri flag.- Parameters:
cacheUri- true if URI content should be cached, false otherwise.- Returns:
- this instance.
-
appendixCaption
Sets appendix-caption label.- Parameters:
appendixCaption- value.- Returns:
- this instance.
-
math
Sets math default engine.- Parameters:
math- value.- Returns:
- this instance.
-
linkAttrs
Sets linkattrs attribute.- Parameters:
linkAttrs- true if Asciidoctor should parse link macro attributes, false otherwise.- Returns:
- this instance.
-
experimental
Sets experimental attribute.- Parameters:
experimental- true if experimental features should be enabled, false otherwise.
-
compatMode
Sets compat mode attribute.- Parameters:
compatMode- value.- Returns:
- this instance.
-
attribute
Sets custom or unlisted attribute- Parameters:
attributeName-attributeValue-- Returns:
- this instance.
-
attributes
Adds all attributes.- Parameters:
attributes- map.- Returns:
- this instance.
-
arguments
Sets attributes in string form. An example of a valid string would be: 'toc numbered source-highlighter=coderay' where you are adding three attributes: toc, numbered and source-highlighter with value coderay.- Parameters:
attributes- in string format.- Returns:
- this instance.
-
arguments
Sets attributes in array form. An example of a valid array would be: '['toc', 'numbered']' where you are adding three attributes: toc and numbered.- Parameters:
attributes- in array format.- 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 Attributes instance.- Returns:
- attributes instance.
-
build()instead.