Note: the features described in this vignette are heavily experimental and may be substantially altered in the future.
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:
git folder in your home
directory.You can enable local mode by passing localMode = TRUE to
grotius::collate
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.
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:
Hugo has to be instructed not to render temporary grotius files.
To do this, you can e.g. add the following in the
config.yaml:
grotius::watch will block the current process so you
will e.g. have to run hugo --watch in a seperate
terminal