I'm currently setting up caching. It might be a good idea to implement cache busting.
We could add a hash to all JS and CSS assets and allow them to be cached forever, and disable caching for HTML.
Here's my approach in more detail:
Move scripts and CSS files from /static to /assets, fingerprint them
Put Photoswipe under versioned path /static/lib/photoswipe/4.1.2/, now it can be safely cached
main.js is already fingerprinted. We can transpile and minify it
Update figure shortcode to allow page resources caching.
I got the latest built-in figure shortcode that makes use of page resources. A fingerprint is added to page resources. Other links are not changed. The original hugo-easy-gallery logic around "src", "link" and "thumb" parameters is preserved.
I also updated the full config with an example of Cache-Control settings.
Hi. Thank you for your great template!
I'm currently setting up caching. It might be a good idea to implement cache busting. We could add a hash to all JS and CSS assets and allow them to be cached forever, and disable caching for HTML.
Here's my approach in more detail:
I got the latest built-in figure shortcode that makes use of page resources. A fingerprint is added to page resources. Other links are not changed. The original hugo-easy-gallery logic around "src", "link" and "thumb" parameters is preserved.
I also updated the full config with an example of Cache-Control settings.
Would be glad to hear your thoughts.