Split each header into its own separate HTML output file.
This option allows you to keep all headers in a single source file, which is much more convenient than working with a billion separate source files, and let them grow naturally as new information is added, but still be able to get a small output page on the rendered website that contains just the content of the given header. Such split pages:
- load faster on the browser
- get way better Google PageRank for title hits
- allow for full metadata display, e.g.:
- Header metadata section
- Disqus/Giscus comments
For example given an input file called a conversion command:would produce the following output files:
hello.bigb
and containing:= h1
h1 content.
A link to another section: \x[h1-1].
== h1 1
h1-1 content.
== h1 1 1
h1-1-1 content.
== h1 1 2
h1-1-2 content.
ourbigbook --split-headers hello.bigb
hello.html
: contains the entire rendered document as usual.Remember that this is calledhello.html
instead ofh1.html
because the toplevel header ID is automatically derived from its filename.Each header contains a on-hover link to the single-file split version of the header.hello-split.html
: contains only the contents directly under= h1
, but not under any of the subheaders, e.g.:Theh1 content.
appears in this rendered outputh1-1-1
does not appear in this rendered output
-split
suffix can be customized with the\H
splitSuffix
argument option.
The-split
suffix is appended in order to differentiate the output path fromhello.html
h1-1.html
,h1-1-1.html
,h1-1-2.html
: contain only the contents direcly under their headers, analogously tohello-split.html
, but now we don't need to worry about the input filename and collisiont, and just directly use the ID of each header
--split-headers
is implied by the --publish
option: the published website will automatically get the split pages. There is no way to turn it off currently. A pull request would be accepted, especially if it offers a ourbigbook.json
way to do it. Maybe it would be nice to have a more generalized way of setting any CLI option equivalent from the ourbigbook.json
, and an option cli
vs cli-publish
so that cli-publish
is publish only. Just lazy for now/not enough pressing use case met. Ancestors
Incoming links
\a
href
argument- Conversion process overview
- Cross reference targets in split headers
- External link
- Features
\H
file
argument\H
splitDefault
argument\H
splitSuffix
argument\H
synonym
argument\H
toplevel
argument- Horizontal rule
- Important command line options
- JavaScript redirect to split on missing ID
- Link to IDs, not URL path
- More powerful
- Motivation
outputOutOfTree
- OurBigBook Web dynamic article tree