Live Reload and Local Mode

Note: the features described in this vignette are heavily experimental and may be substantially altered in the future.

Local Mode

Local mode will try to find locally cloned versions of remote repositories instead of re-cloning them. This is intended to shorten the feedback loop between writing content and building the site.

Be aware of the following limitations:

You can enable local mode by passing localMode = TRUE to grotius::collate

Watch

Grotius can watch changes to local input and re-render content automatically. Re-render currently only works for changes to document input files, not changes to the grotius.yaml file itself (e.g. adding a document or editing inline input).

Run grotius::watch instead of grotius::renderSite to use the watch feature. Note that the default arguments of watch will enable localMode in collate, since watch is meant for local iterative development and lacks the ability to poll for git changes in the remote.

Hugo

When used together with the --watch feature of hugo (https://gohugo.io/getting-started/usage/#livereload), grotius::watch() can result in fully interactive experience, where updating any of the grotius document input will re-render the output document which will subsequently retrigger the hugo build and reload the page in the browser.

There are some caveats to this: