mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2025-05-13 07:47:47 +02:00
Use Hugo's built-in subresource integrity support
We can use Hugo's built-in SRI support instead of using our custom SRI generator script (as cool as it was at the time). This is more clean and gives us the added benefit of adding fingerprints to the CSS and JS filenames, which acts as a cache buster. See: https://gohugo.io/hugo-pipes/introduction/ See: https://github.com/alanorth/hugo-theme-bootstrap4-blog/issues/120
This commit is contained in:
@ -7,13 +7,13 @@
|
||||
"url": "https://github.com/alanorth/hugo-theme-bootstrap4-blog.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build:css": "node-sass --output-style expanded --precision 6 source/scss/style.scss static/css/style.css.tmp && cleancss --level 1 static/css/style.css.tmp -o static/css/style.css",
|
||||
"build:ltrcss": "rtlcss -s static/css/style.css.tmp static/css/style.rtl.css.tmp && cleancss --level 1 static/css/style.rtl.css.tmp -o static/css/style.rtl.css",
|
||||
"build:css": "node-sass --output-style expanded --precision 6 source/scss/style.scss assets/css/style.css.tmp && cleancss --level 1 assets/css/style.css.tmp -o assets/css/style.css",
|
||||
"build:ltrcss": "rtlcss -s assets/css/style.css.tmp assets/css/style.rtl.css.tmp && cleancss --level 1 assets/css/style.rtl.css.tmp -o assets/css/style.rtl.css",
|
||||
"build:fonts": "cp node_modules/font-awesome/fonts/* static/fonts",
|
||||
"build:cookieconsent": "cp node_modules/cookieconsent/build/cookieconsent.min.css static/css && cp node_modules/cookieconsent/build/cookieconsent.min.js static/js",
|
||||
"build:cookieconsent": "cp node_modules/cookieconsent/build/cookieconsent.min.css assets/css && cp node_modules/cookieconsent/build/cookieconsent.min.js assets/js",
|
||||
"build:generatesri": "node build/sri.js > data/sri.toml",
|
||||
"build": "npm run build:css && npm run build:ltrcss && npm run build:fonts && npm run build:cookieconsent && npm run build:generatesri && npm run clean",
|
||||
"clean": "rm static/css/style.css.tmp static/css/style.rtl.css.tmp"
|
||||
"clean": "rm assets/css/style.css.tmp assets/css/style.rtl.css.tmp"
|
||||
},
|
||||
"keywords": "hugo",
|
||||
"author": "Alan Orth",
|
||||
|
Reference in New Issue
Block a user