mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 07:18:54 +00:00
committed by
Bjørn Erik Pedersen
parent
3e3b849cc7
commit
36cdb2c789
@@ -402,6 +402,10 @@ OUTER:
|
||||
sourcesContent = api.SourcesContentExclude
|
||||
}
|
||||
|
||||
if opts.IsCSS && opts.MainFields == nil {
|
||||
opts.MainFields = []string{"style", "main"}
|
||||
}
|
||||
|
||||
opts.compiled = api.BuildOptions{
|
||||
Outfile: outFile,
|
||||
Bundle: true,
|
||||
|
||||
@@ -304,7 +304,7 @@ disableKinds = ["taxonomy", "term"]
|
||||
}
|
||||
-- layouts/home.html --
|
||||
{{ with resources.Get "css/main.css" }}
|
||||
{{ with . | css.Build (dict "minify" true "mainFields" (slice "style")) }}
|
||||
{{ with . | css.Build (dict "minify" true) }}
|
||||
CSS size: {{ .Content | len }}|{{ .RelPermalink }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user