diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 0dd73ad..e0a952e 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -1,2 +1,5 @@ # website title title = "Bridget" +# use bundled js and css +# if you want to build the js and css from scratch, set this to false and run `npm install` and `npm run build` +bundled = false diff --git a/layouts/partials/head/link.html b/layouts/partials/head/link.html index 3b28a7b..b3cd1e6 100644 --- a/layouts/partials/head/link.html +++ b/layouts/partials/head/link.html @@ -8,13 +8,24 @@ {{- partial "plugin/style.html" $style -}} {{/* main style */}} -{{- $style := dict "Source" "scss/style.scss" "Fingerprint" $fingerprint -}} -{{- $options := dict "targetPath" "css/style.css" "enableSourceMap" true "includePaths" (slice "node_modules") -}} -{{- $style = dict "Context" . "ToCSS" $options "Minify" hugo.IsProduction "Defer" true | merge $style -}} -{{- partial "plugin/style.html" $style -}} +{{- if site.Params.bundled -}} + + +{{- else -}} + {{- $style := dict "Source" "scss/style.scss" "Fingerprint" $fingerprint -}} + {{- $style := dict "Source" "scss/style.scss" "Fingerprint" $fingerprint -}} + {{- $options := dict "targetPath" "css/style.css" "enableSourceMap" true "includePaths" (slice "node_modules") -}} + {{- $style = dict "Context" . "ToCSS" $options "Minify" hugo.IsProduction "Defer" true | merge $style -}} + {{- partial "plugin/style.html" $style -}} +{{- end -}} {{/* main js */}} - + {{/* fonts */}}