wintersmith icon indicating copy to clipboard operation
wintersmith copied to clipboard

Asset hashes or versioning

Open zladuric opened this issue 2 years ago • 0 comments

Hello, Is there a way to create asset hashes or something similar in content names? I want to cache css and js files, but I can't do that unless I somehow address it. I've tried searching without success: is there an option, an API, a plugin that does this? So that when I have a script block like this:

script(src=contents.js['main.js'].url)

...that it generates the output similar to this:

<script src="main.<CONTENT_SHA>.js"></script>

...or something similar to that? Timestamps, version numbers, anything?

zladuric avatar Mar 07 '22 15:03 zladuric