migrate bootstrap and flags to bundle
This commit is contained in:
parent
3957190425
commit
82feb539bd
532 changed files with 63 additions and 7630 deletions
5
layouts/partials/helpers/get-sass-options.html
Normal file
5
layouts/partials/helpers/get-sass-options.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ return (dict
|
||||
"outputStyle" "compressed"
|
||||
"enableSourceMap" (not hugo.IsProduction)
|
||||
"includePaths" "node_modules"
|
||||
) }}
|
11
layouts/partials/helpers/style-bundle.html
Normal file
11
layouts/partials/helpers/style-bundle.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{/* setup Sass options */}}
|
||||
{{- $options := partial "helpers/get-sass-options.html" -}}
|
||||
{{- $options = $options | merge (dict "targetPath" "application.css") -}}
|
||||
|
||||
{{/* Compile hugo template `application.template.scss` into `application.scss`. */}}
|
||||
{{- $template := resources.Get "styles/application.template.scss" -}}
|
||||
{{- $scss := $template | resources.ExecuteAsTemplate "styles/application.scss" . -}}
|
||||
|
||||
{{/* Bundle application.scss */}}
|
||||
{{- $bundle := $scss | resources.ToCSS $options | fingerprint -}}
|
||||
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" integrity="{{ $bundle.Data.Integrity }}" />
|
Loading…
Add table
Add a link
Reference in a new issue