hugo: fix cachebuster regexp

Cachebusters previously failed to detect changes in asset/layout files
due to a bad regex. Also simplified patterns by removing unnecessary
escapes and quotations.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2023-12-21 16:06:20 +01:00
parent b7e3ae1c69
commit 0bb3e5373d
1 changed files with 8 additions and 8 deletions

View File

@ -39,14 +39,14 @@ related:
build:
writeStats: true
cachebusters:
- source: "assets/watching/hugo_stats\\.json"
target: "styles\\.css"
- source: "(postcss|tailwind)\\.config\\.js"
target: "css"
- source: "assets/.*\\.(js|ts|jsx|tsx)"
target: "js"
- source: "(assets|layouts)/.*\\.(.*)$"
target: "$1"
- source: assets/watching/hugo_stats\.json
target: styles\.css
- source: (postcss|tailwind)\.config\.js
target: css
- source: assets/.*\.js
target: js
- source: (assets|layouts)/.*\.(.*)$
target: "$2"
outputFormats:
redirects: