OurBigBook
When you run:
npx ourbigbook .
it converts all files in the current directory separately, e.g.:
  • README.bigb to index.html, since README is a magic name that we want to show on the root URL
  • not-readme.bigb to not-readme.html, as this one is a regular name unlike README
  • main.scss to main.css
If one of the input files starts getting too large, usually the toplevel README.bigb in which you dump everything by default like Ciro does, you can speed up development and just compile files individually with either:
npx ourbigbook README.bigb
npx ourbigbook not-readme.bigb
Note however that when those individual files have a cross file reference to something defined in not-readme.bigb, e.g. via \x[h2-in-not-the-readme], then you must first do a first pass once with:
npx ourbigbook .
to parse all files and extract all necessary IDs to the ID database. That would be optimized slightly wit the --no-render command line option:
npx ourbigbook --no-render .
to only extract the IDs but not render, which speeds things up considerably
When dealing with large files, you might also be interested in the following amazing options:
To produce a single standalone output file that contains everything in a directory run:
npx ourbigbook --embed-resources --embed-includes README.bigb
xdg-open index.html
You can now just give index.html to any reader and they should be able to view it offline without installing anything. The flags are:
  • --embed-includes: without this, \Include[not-readme] shows as a link to the file not-readme.html which comes from not-readme.bigb With the flag, not-readme.bigb output gets embedded into the output index.html directly
  • --embed-resources: by default, we link to CSS and JavaScript that lives inside node_modules. With this flag, that CSS and JavaScript is copied inline into the document instead. One day we will try to handle images that way as well

Ancestors