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:
For example given an input file called
a conversion command:
= 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.
would produce the following output files:
ourbigbook --split-headers hello.bigb
hello.html: contains the entire rendered document as usual.Remember that this is called
h1.htmlbecause 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.:The
h1 content.appears in this rendered output
h1-1-1does not appear in this rendered output
-splitsuffix can be customized with the
splitSuffixargument option. The
-splitsuffix is appended in order to differentiate the output path from
h1-1-2.html: contain only the contents direcly under their headers, analogously to
hello-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-headersis implied by the
--publishoption: 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.jsonway 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-publishis publish only. Just lazy for now/not enough pressing use case met.
- Conversion process overview
- Cross reference targets in split headers
- External link
- Important command line options
- Link to IDs, not URL path
- More powerful
- OurBigBook Web dynamic article tree