Don't quit
ourbigbook
immediately.Instead, watch the selected file or directory for changes, and rebuild individual files when changes are detected.
Watch every When a directory is given as the input path, this automatically first does an ID extraction pass on all files to support cross file references.
.bigb
file in an entire directory:ourbigbook --watch .
Now you can just edit any OurBigBook file such has
index.bigb
, save the file in your editor, and refresh the webpage and your change should be visible, no need to run a ourbigbook
command explicitly every time.Exit by entering Ctrl + C on the terminal.
Watch a single file:When a single file is watched, the reference database is not automatically updated. If it is not already up-to-date, you should first update it with:otherwise you will just get a bunch of undefined ID errors every time the input file is saved.
ourbigbook --watch index.bigb
ourbigbook .
TODO: integrate Live Preview: asciidoctor.org/docs/editing-asciidoc-with-live-preview/ to also dispense the browser refresh.