passing options to asciidoctor filter

25 views
Skip to first unread message

Bilinmek Istemiyor

unread,
Apr 16, 2021, 10:52:46 PM4/16/21
to nanoc

Hello,

I am completely newbie to nanoc. I am reading the documentation. I stumbled to nanoc while searching for a static site generator to be used with asciidoctor. 

I have seen that asciidoctor filter is defined but I could not understant how to pass command line parameters to asciidoctor command via filter.

Any help  much appreciated.

BB

Denis Defreyne

unread,
Apr 18, 2021, 4:12:48 AM4/18/21
to noreply-spamdigest via nanoc
Hey BB,

When using the :asciidoctor filter, all parameters are passed to the Asciidoctor.convert call (see https://docs.asciidoctor.org/asciidoctor/latest/api/options/ for all API options). Nanoc’s Asciidoctor filter doesn’t use the command line, but calls the API instead.

So, you should be able to do e.g.
filter :asciidoctor, backend: 'docbook5'
… which would pass the “backend” option to Asciidoctor.

Hope this helps,

Denis Defreyne
[dəˈni] • pronouns: he/him

--
You received this message because you are subscribed to the Google Groups "nanoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanoc+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages