asciidoc-loader
This is a Webpack loader that allows you to import Asciidoc .adoc
files that
contain include and image directives. The result is content that you can pass
directly to asciidoctor.js.
Currently, the lineoffset
parameter of the include directive is supported, but
lines, tag, and indent are not. All parameters of the image directive are passed
through to asciidoctor unchanged.
; { return <Asciidoc source=index attrs=system: 'atlas'/> ;}
Below is the Asciidoc React component that uses asciidoctor.js to render and highlight.js to syntax highlight code blocks:
;;;;; let asciidoctor = ; { superprops; thishighlightCode = thishighlightCode; } { this; } { this; } { thisroot; } { let converted = asciidoctor; return <div ref= { thisroot = root; } dangerouslySetInnerHTML= __html: converted /> } AsciidocpropTypes = source: PropTypesstring attrs: PropTypesany;