You can configure the input and output directories, which files to copy and which pegdown
options are used. You can also include custom header and footer and general title.
Note: ##SITE_BASE## will be translated to a relative path from the markdown file's
directory to base directory. This is not necessary if recursiveInput configuration is
false.
footerHtmlFile : Location of header HTML file as String,
${project.basedir}/src/main/resources/markdown/html/footer.html
Example:
<footer></footer></html>
copyDirectories: Comma separated list of directories to copy to output directory, like:
`css,js,images,folder*/images,**images'
defaultTitle: If set the titleToken is replaced in every page. Otherwise the first h1 is
used.
recursiveInput: Process also inputDirectory's sub directories if option true. Default
false.
transformRelativeMarkdownLinks: Transform relative url suffix from .md to .html if
option true. Default false.
attributes: defines a list of attributes by Node class to apply to HTML results. Each
attribute has the syntax:
NodeClass|attributeName1=attributeValue1|attributeName2=attributeValue2 will add
attributeName1 and attributeName2 to element node NodeClass
for table, block quote and ordered list item class customization:
pegdownExtensions: Comma separated list of constants as specified in
com.vladsch.flexmark.profiles.pegdown.Extensions. The default is TABLES.
ℹ️flexmark-java has many more extensions and configuration options than
pegdown in addition to extensions available in pegdown 1.6.0, the following extensions are
available:
SMARTS: Beautifies .... . ., -- and --- to …, …, – and — respectively.
QUOTES: Beautifies single quotes ', ", << and >> to ‘’‛, “”‟, «
and »
SMARTYPANTS: Convenience extension enabling both, SMARTS and QUOTES, at once.
ATXHEADERSPACE: Require a space between the # and the header title text, as per
Github-flavoured-Markdown. Frees up # without a space to be just plain text.
FORCELISTITEMPARA: Wrap a list item or definition term in <p> tags if it contains more
than a simple paragraph.
RELAXEDHRULES: allow horizontal rules without a blank line following them.
TASKLISTITEMS: parses bullet lists of the form * [ ], * [x] and * [X] to create
Github-flavoured-Markdown task list items.
EXTANCHORLINKS: Generate anchor links for headers using complete contents of the header.
Spaces and non-alphanumerics replaced by -, multiple dashes trimmed to one.
Anchor link is added as first element inside the header with empty content: <h1><a name="header"></a>header</h1>
EXTANCHORLINKS_WRAP: used in conjunction with above to create an anchor that wraps header
content: <h1><a name="header">header</a></h1>
TOC: used to enable table of contents extension [TOC] The TOC tag has the following
format: [TOC style]. style consists of space separated list of options:
levels=levelList where level list is a comma separated list of levels or ranges. Default
is to include heading levels 2 and 3. Examples:
levels=4 include levels 2, 3 and 4
levels=2-4 include levels 2, 3 and 4. same as levels=4
levels=2-4,5 include levels 2, 3, 4 and 5
levels=1,3 include levels 1 and 3
text to only include the text of the heading
formatted to include text and inline formatting
bullet to use a bullet list for the TOC items
numbered to use a numbered list for TOC items
hierarchy: hierarchical list of headings
flat: flat list of headings
reversed: flat reversed list of headings
increasing: flat, alphabetically increasing by heading text
decreasing: flat, alphabetically decreasing by heading text
MULTI_LINE_IMAGE_URLS: enables parsing of image urls spanning more than one line the
format is strict ![alt text](urladdress? must be the last non-blank segment on a line. The
terminating ) or "title") must be the first non-indented segment on the line. Everything
in between is sucked up as part of the URL except for blank lines.
RELAXED_STRONG_EMPHASIS_RULES: allow Strong/Emphasis marks to start when not preceded by
alphanumeric for _ and as long as not surrounded by spaces for * instead of only when
preceded by spaces.
FOOTNOTES: Support MultiMarkdown style footnotes: [^n] for footnote reference and [^n]: Footnote text for footnotes. Where n is one or more digit, letter, -, _ or ..
Footnotes will be put at the bottom of the page, sequentially numbered in order of
appearance of the footnote reference. Footnotes that are not referenced will NOT be included
in the HTML output.
This paragraph has a footnote[^1] and another footnote[^two].
This one has more but out of sequence[^4] and[^eight].
[^two]: Footnote 2 with a bit more text
and another continuation line
[^1]: Footnote 1
[^3]: Unused footnote, it will not be added to the end of the page.
[^4]: Out of sequence footnote
[^eight]: Have one that is used.
will generate:
<p>This paragraph has a footnote<supid="fnref-1"><ahref="#fn-1" class="footnote-ref">1</a></sup> and another footnote<supid="fnref-2"><ahref="#fn-2" class="footnote-ref">2</a></sup>.</p><p>This one has more but out of sequence<supid="fnref-3"><ahref="#fn-3" class="footnote-ref">3</a></sup> and<supid="fnref-4"><ahref="#fn-4" class="footnote-ref">4</a></sup>. </p><divclass="footnotes"><hr/>
<ol><liid="fn-1"><p>Footnote 1<ahref="#fnref-1" class="footnote-backref">↩</a></p></li><liid="fn-2"><p>Footnote 2 with a bit more text and another continuation line<ahref="#fnref-2" class="footnote-backref">↩</a></p></li><liid="fn-3"><p>Out of sequence footnote<ahref="#fnref-3" class="footnote-backref">↩</a></p></li><liid="fn-4"><p>Have one that is used.<ahref="#fnref-4" class="footnote-backref">↩</a></p></li></ol></div>
to look like this:
This paragraph has a footnote1 and another footnote2.
请发表评论