getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
13.38k stars 936 forks source link

`zola serve`: option to store html files on disk. #2377

Open ppom0 opened 8 months ago

ppom0 commented 8 months ago

I'm using TailwindCSS as a CSS framework. It generates CSS classes definitions from the CSS classes present in the HTML.

If I configure TailwindCSS to look after the templates folder, it works fine. I use tailwindcss --watch, which generated its CSS to the static folder, and zola serve, which put assets in the public folder.

But when the CSS class names are dynamically generated by Zola macros, they're not present in the templates folder: only in the public folder, where generated HTML files live.

Problem is: only zola build actually write those files, zola serve store them in-memory, thus making them inaccessible to tailwindcss. It would be super useful to store to have an option like --html-on-disk to the serve subcommand for those kinds of workflows.

ppom0 commented 8 months ago

https://zola.discourse.group/t/serve-option-to-store-html-files-on-disk/1975