custom css support
This commit is contained in:
parent
86c41ad0ec
commit
091157b576
|
@ -219,6 +219,7 @@ You shoud make your own menu.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
description = "The Zzo theme for Hugo example site."
|
description = "The Zzo theme for Hugo example site."
|
||||||
|
custom_css = ["css/foo.css", "css/bar.css"]
|
||||||
|
|
||||||
# body
|
# body
|
||||||
enableToc = true
|
enableToc = true
|
||||||
|
|
|
@ -25,6 +25,7 @@ rssLimit = 100
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
description = "The Zzo theme for Hugo example site."
|
description = "The Zzo theme for Hugo example site."
|
||||||
|
custom_css = []
|
||||||
|
|
||||||
# body
|
# body
|
||||||
enableToc = true
|
enableToc = true
|
||||||
|
|
|
@ -2,3 +2,7 @@
|
||||||
{{ $main_template := resources.Get "sass/main.scss" }}
|
{{ $main_template := resources.Get "sass/main.scss" }}
|
||||||
{{ $main_style := $main_template | resources.ExecuteAsTemplate "main_parsed.scss" . | toCSS $main_options | minify }}
|
{{ $main_style := $main_template | resources.ExecuteAsTemplate "main_parsed.scss" . | toCSS $main_options | minify }}
|
||||||
<link rel="stylesheet" href="{{ $main_style.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $main_style.RelPermalink }}">
|
||||||
|
|
||||||
|
{{ range .Site.Params.custom_css -}}
|
||||||
|
<link rel="stylesheet" href="{{ . | absURL }}">
|
||||||
|
{{- end }}
|
Loading…
Reference in New Issue