Is there something similar to asciidoc.conf in asciidoctor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there something similar to asciidoc.conf in asciidoctor

asciidocuser48
Is there something similar to asciidoc.conf in asciidoctor where you can configure syntax and behavior (i.e., replacements, special words)?

The line below would be towards the beginning of a src asciidoc file.

include::includes/local-config[]

It would contain a list of attributes common to all documents and some conditional definitions, like:

:mch-abc: value1
:mch-def: value2
:body-id: value3
"maindoc: value4

ifdef::var[]
[blockdef-listing]
subs=attributes
endif::var[]

ifdef::basebackend-html[]
:on: x
:off:  
endif::basebackend-html[]

:doctop: {basebackend-html?link:index.html[☖] link:#footer[⇩] link:#header[⇧]}

1. All the ifdef - endif pairs, without their content, are displayed at the top of the converted html document.

2. The source contains:

[goto]#{doctop}#

It is being converted to:

{basebackend-html?☖ ⇩ ⇧}

The command I run at this time:
  asciidoctor  --trace -v \
    --backend=html5 \
    --doctype=article \
    --section-numbers \
    -a attribute-missing=warn \
    -a attribute-undefined=warn \
    -a webfonts \
    -a toc=left \
    -a linkcss  \
    -a stylesheet=asciidoctor.css \
    -a source-highlighter=highlightjs \
    --out-file="${srv}/output.html" "${inDir}/input"
Reply | Threaded
Open this post in threaded view
|

Re: Is there something similar to asciidoc.conf in asciidoctor

mojavelinux
Administrator
Is there something similar to asciidoc.conf in asciidoctor where you can configure syntax and behavior (i.e., replacements, special words)? 

In Asciidoctor, we opted for a programmatic extensions API, which gives you much more power and flexibility.


From this, it would be possible to write an extension that provides functionality similar to what's in AsciiDoc Python.

-Dan

On Fri, Jan 26, 2018 at 9:05 AM, asciidocuser48 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Is there something similar to asciidoc.conf in asciidoctor where you can configure syntax and behavior (i.e., replacements, special words)?

The line below would be towards the beginning of a src asciidoc file.

include::includes/local-config[]

It would contain a list of attributes common to all documents and some conditional definitions, like:

:mch-abc: value1
:mch-def: value2
:body-id: value3
"maindoc: value4

ifdef::var[]
[blockdef-listing]
subs=attributes
endif::var[]

ifdef::basebackend-html[]
:on: x
:off:  
endif::basebackend-html[]

:doctop: {basebackend-html?link:index.html[☖] link:#footer[⇩] link:#header[⇧]}

1. All the ifdef - endif pairs, without their content, are displayed at the top of the converted html document.

2. The source contains:

[goto]#{doctop}#

It is being converted to:

{basebackend-html?☖ ⇩ ⇧}

The command I run at this time:
  asciidoctor  --trace -v \
    --backend=html5 \
    --doctype=article \
    --section-numbers \
    -a attribute-missing=warn \
    -a attribute-undefined=warn \
    -a webfonts \
    -a toc=left \
    -a linkcss  \
    -a stylesheet=asciidoctor.css \
    -a source-highlighter=highlightjs \
    --out-file="${srv}/output.html" "${inDir}/input"


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Is-there-something-similar-to-asciidoc-conf-in-asciidoctor-tp6140.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux