verless / verless

A Static Site Generator designed for Markdown-based content with a focus on simplicity and performance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document special handling of 'generated' directories

dominikbraun opened this issue · comments

#160 and #166 introduce pre-build commands for projects and templates. They may generated assets, CSS files, JS files and other stuff.

When serving the site and watching it for changes, this leads to a problem: Something changes, verless re-builds the site, the build runs the pre-build commands, those commands generate a file - and verless notices that change and triggers a re-build again, which runs the pre-build commands again, ... and so on.

To break this cycle, we introduced a convention: Anything that goes into a directory called generated will be ignored by the watcher. Therefore, a theme should generate its assets into its own generated directory, and everything's fine.

This convention should be documented briefly.

Done with #207.