-
Notifications
You must be signed in to change notification settings - Fork 22
Description
The current build process is currently comprised of scanning the list of all websites within weblorg--sites
and then scanning all the routes within each site once, and running the pipeline once. That must work well reasonably fast since it's part of the main feature of weblorg. However, while developing themes or even during the process of building the content, it'd be quite helpful if we triggered the build of only the files that were changed.
It'd be great if weblorg-export
could take a :watch
parameter and block forever if that was set to true and re-generate the website over any file changes.
at the end of our well known publish.el files we'd do something like
(weblorg-export :watch (getenv "WATCH"))
at the terminal we'd do something like this
WATCH=t emacs --script publish.el
That'd hang the terminal and print out events every time files got changed.
Notice that this is pretty limited; but if it serves us well, it can be expanded to 1. be smarter about what it watches, maybe by taking something like :watch-pattern
and :watch-exclude
and then 2. by trying to only re-generate pieces related to the modification. Notice that 2 might get a bit more complicated because if we receive a notification about a change on a template, it's not enough to look for :template
entries in routes, as maybe the template being changed isn't there, but might be in the extends
of another template.