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:
parent
ff39763b5e
commit
e33729852e
2 changed files with 5 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue