Added filter to suffix strings with a timestamp query string.

This is useful for changes made to the stylesheets for cache-busting
purposes.
This commit is contained in:
Benjamin A. Shelton 2026-03-26 21:04:07 -06:00
commit e33729852e
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
2 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,10 @@ module.exports = config => {
// Timestamp for datetime element
config.addFilter('timestamp', dates.timestamp)
config.addFilter('ts_suffix', (s) => {
return s + "?" + Date.now()
})
// Remove whitespace from a string
config.addNunjucksFilter('spaceless', helpers.spaceless)