Comments (6)
Hi @************, thanks for the suggestion. However, it seems like this is more a problem of URL rewriting than HTML generation (specific to GitHub Pages).
Will GitHub Pages will automatically redirect from /_h2.html
to /_h2
?
# Generate output
asciidoctor -r asciidoctor-multipage -b multipage_html5 -D out/tmp tmp.adoc
# Only needed if GitHub Pages does *not* redirect from `/_h2.html` to `/_h2`
sed -E -i 's/(<a href="[^"]+).html">/\1">/g' out/tmp/*.html
# Remove .html extensions
rename 's/\.html$//' out/tmp/*.html
Does that help?
from asciidoctor-multipage.
Hi @************, thanks for the suggestion. However, it seems like this is more a problem of URL rewriting than HTML generation (specific to GitHub Pages).
Will GitHub Pages will automatically redirect from
/_h2.html
to/_h2
?
It does no redirectt, e.g.: https://************.com/china-************/about.html
# Generate output asciidoctor -r asciidoctor-multipage -b multipage_html5 -D out/tmp tmp.adoc # Only needed if GitHub Pages does *not* redirect from `/_h2.html` to `/_h2` sed -E -i 's/(<a href="[^"]+).html">/\1">/g' out/tmp/*.html # Remove .html extensions rename 's/\.html$//' out/tmp/*.htmlDoes that help?
Sure, but haxx :-)
from asciidoctor-multipage.
There is some related discussion about this in issue #26.
The asciidoctor-multipage extension handles writing of all files excluding the main root page, so it seems like it would be trivial to remove the .html
extension from those output files. However, because Asciidoctor handles writing of the main output file it may not be possible to change the filename used for that file.
However, it may be possible to implement this as follows:
- Support use of the Asciidoctor
--out-file
option as discussed in issue #26. - Add a
multipage-omit-extensions
document attribute for omitting the.html
extension from non-root output files. - Execute Asciidoctor with the
--out-file
option set to an output path with no.html
extension.
from asciidoctor-multipage.
May be it's related to jekyll and how jekyll treats files with underscore?
There is here a similar issue in other project:
The suggested solution is to add .nojekyll to the root directory. It's what I did in my Github pages.
from asciidoctor-multipage.
May be it's related to jekyll and how jekyll treats files with underscore?
There is here a similar issue in other project:
The suggested solution is to add .nojekyll to the root directory. It's what I did in my Github pages.
I don't think it has anything to do with Jekyll. Basically, asciidoctor-multipage
produces <a href="child-id.html">
and I want it to produce <a href="child-id">
instead. Both child-id.html
and child-id
work, but I want the one without .html
which looks nicer.
from asciidoctor-multipage.
Sorry. I think you have a problem with underscore html files (I did), but I already saw what you think is uglier.
from asciidoctor-multipage.
Related Issues (20)
- Preamble affects included attributes HOT 2
- Error in multiparts documents when partnums attribute is specified HOT 1
- Use --out-file break the links to home HOT 1
- Custom `toclevels` / option to keep full TOC HOT 4
- Clarify usage of Cross-References HOT 2
- ToC generated inside block level (a) table cells with toc2 attr set on command line HOT 5
- Wrong numeration of appendix chapters HOT 4
- source highlight style does not extract to a file HOT 6
- Do not generate the configurate theme style file for Rouge highlighter HOT 2
- The tags which are in the section title are escaped HOT 1
- The appendix section number is wrong. HOT 4
- Variables not substituted in TOC HOT 3
- How do I prevent asciidoctor-multipage from resetting the latex equation counter after every HTML Page? HOT 3
- Error: "Failed to execute goal de.saumya.mojo:gem-maven-plugin" HOT 4
- Inheriting included attributes HOT 9
- wrong permissions on /var/lib/gems/3.0.0/gems/asciidoctor-multipage-0.0.16/bin/asciidoctor-multipage ? HOT 1
- Using output file name for first page (--out-file FILE is not supported) HOT 1
- Cannot disable stylesheets across all pages HOT 1
- Page title based on heading title HOT 4
- Rewrite some parts of extension, adding a Page class HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-multipage.