Content tagged with "zola"

  • TIL: How to do manual cache busting in Zola

    As the cachebust=true functionality of the get_url filter is broken in version 0.11 you need to have another way to bust cache on static assets.

    A simple way is to add a build time stamp at the end of the asset url: https://domain.com/asset.png?t=timestamp. For example a stylesheet might be included like this

    
    

    This is not perfect as ideally we only want to bust the cache if the content actually changes but at least we ensure that the visitor does not see stale static files.

  • Using Tailwind CSS with the Zola Static Site Generator

    After using it in a couple small projects I've fallen in love with the Tailwind CSS framework as a way to structure and apply CSS, and as a design system. When I was looking for a static site generator to build this site with, one of my search criteria was support for Tailwind CSS, either baked-in, or easy to add.

    I ultimately ended up adopting the Zola static site generator due to its simplicity, clear documentation, performance (haha millisecond builds go brrr), and it having a template language I preferred over the one used by Hugo. Despite Zola having an inbuilt support for processing SASS/SCSS, it does so with a SASS processor that's written in Rust and included in the Zola binary. As Tailwind CSS is build on top of the PostCSS tool, we can't throw the Tailwind styles into the Zola CSS system and call it a day.

    Continue reading...