Skip to content

daviddrysdale/mdbook-asciidoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdbook-asciidoc

A backend for mdbook that outputs AsciiDoc.

Installation

To use, install the tool

cargo install mdbook-asciidoc

and add it as a backend in book.toml:

[preprocessor.asciidoc]

Configuration

The following configuration values can be set in book.toml.

Name Type Default Description
allow-asciidoc boolean false Cope with some AsciiDoc constructs included in the Markdown source when set.
heading-offset integer 0 Extra offset to apply to heading levels.
skip-chapters string "" Comma-separated list of filenames to ignore when generating AsciiDoc.
unicode-subst map<string,string> empty Map Unicode characters (either as-is or in U+1234 form) to replacements.
link-mode string "default" How to render external links ("default"=as-is, "shorten"=via short-links table.
short-links map<string, string> empty Map from long to short URLs. In shorten mode, links not in this table will be skipped.

AsciiDoc Passthrough

When the allow-asciidoc config option is set, AsciiDoc in the source document can be included as the content attribute of an <asciidoc> HTML-like tag, to prevent it being interpreted by Markdown.

For example, four underscores are used in AsciiDoc to delimit block quotations, but would also be interpreted as a horizontal rule in Markdown if not escaped:

    <asciidoc content='____'></asciidoc>

About

mdBook backend for AsciiDoc generation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published