Re: Filename extension changed by default when upgrading to asciidoctor 2
Posted by
mojavelinux on
Apr 04, 2019; 12:02pm
URL: https://discuss.asciidoctor.org/Filename-extension-changed-by-default-when-upgrading-to-asciidoctor-2-tp6822p6829.html
I also want to point out that you can set the inherited backend now when you set the backend. This was done explicitly to deal with the situation where the basebackend (and thus outfilesuffix) cannot be guessed from the backend, which is your case.
Set the backend as follows:
backend: 'slides:html'
Then, to_file: true will work (because your custom backend will inherit from the html backend). Let me know if that works out for you.
Cheers,
-Dan
On Tue, Apr 2, 2019 at 12:31 PM mojavelinux [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
It depends on how your custom backend / converter works, but the simplest way to solve this without hacking Asciidoctor core is to set the outfilesuffix attribute. The outfilesuffix is what is used to determine what suffix to put on the output file. You can specify this attribute via the API. I'm curious to know if that solves your issue.
There's also a way for a custom backend / converter to self register an outfilesuffix. But that may be more intricate than you need.
Cheers,
-Dan
On Tue, Apr 2, 2019 at 8:35 AM dsyer [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
Update: looks like `Asciidoctor::DEFAULT_EXTENSIONS['<backend>'] = '.html'` was what I needed, where `<backend>` is the id of the backend.
--
--