owenh000 / asciidoctor-multipage

A configurable multipage HTML converter for Asciidoctor
https://owenh.net/asciidoctor-multipage
MIT License
58 stars 23 forks source link

Use --out-file break the links to home #26

Open jesustorresdev opened 2 years ago

jesustorresdev commented 2 years ago

Run asciidoctor using --out-file to set de output filename:

$ asciidoctor -r asciidoctor-multipage -b multipage_html5  --out-file out/index.html src/main.adoc

Then out/index.html is created, but the links to home in every file refer to main.html, so all are broken.

I know the option -D works fine, but to be able to set the filename of the top-level document, allows to save it as index.html, for example, ready to publish the directory in a website.

After some research, I guess docname is used as the node ID of top-level document and the link URL for home derive from that ID.

Could it be solved if outfile (maybe, without extension) is used instead? I don't know if that change could break other things.

owenh000 commented 2 years ago

Hi @aplatanado, thanks for the report. Here are some brainstorming ideas:

Also, this is related to issue #21.