Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--template-dir disables multipage generation #19

Open
cirosantilli opened this issue Jul 27, 2021 · 4 comments
Open

--template-dir disables multipage generation #19

cirosantilli opened this issue Jul 27, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@cirosantilli
Copy link

cirosantilli commented Jul 27, 2021

Gemfile

source 'https://rubygems.org'

gem 'asciidoctor', '2.0.11'
gem 'asciidoctor-multipage', '0.0.12 '

tmp.adoc

= h1

== h2

Builds fine with the standard:

bundle exec asciidoctor -b multipage_html5 -D out/tmp -r asciidoctor-multipage tmp.adoc

Outcome: out/tmp/tmp.html and out/tmp/_h2.html are generated as expected.

But if I add --template-dir template_dir on the command line to create custom output elements (see https://stackoverflow.com/questions/63917971/how-to-create-custom-html-output-for-an-existing-asciidoctor-asciidoc-macro/63917972#63917972 ):

mkdir template_dir
bundle exec asciidoctor -b multipage_html5 -D out/tmp --template-dir template_dir -r asciidoctor-multipage tmp.adoc

then only out/tmp/tmp.html is generated, but not out/tmp/_h2.html.

It does not make a difference it template_dir contain anything or not.

@owenh000
Copy link
Owner

owenh000 commented Aug 4, 2021

@cirosantilli, thanks for the report. Internally, Asciidoctor ties in a separate TemplateConverter for handling the provided templates; this breaks the asciidoctor-multipage extension. More investigation is needed.

@owenh000 owenh000 added the bug Something isn't working label Aug 8, 2021
@owenh000 owenh000 pinned this issue Aug 28, 2021
@marcj
Copy link

marcj commented Jul 9, 2022

Since --template-dir isn't working, what is the correct way to change the generated HTML?

@owenh000
Copy link
Owner

Hi @marcj! If --template-dir is the recommended way to change the generated HTML for Asciidoctor, then it is also the recommended way for asciidoctor-multipage. If you need this issue fixed, please consider contributing by opening a pull request for the necessary changes or sponsoring the project. Thanks!

@owenh000 owenh000 unpinned this issue Apr 3, 2024
@owenh000
Copy link
Owner

owenh000 commented Apr 3, 2024

This issue may require #46 to be done first, because resolving that issue will hopefully provide more control over Asciidoctor generation of the individual output pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants