custom css support

This commit is contained in:
zzossig 2019-11-06 12:07:30 +09:00
parent 86c41ad0ec
commit 091157b576
3 changed files with 6 additions and 0 deletions

View File

@ -219,6 +219,7 @@ You shoud make your own menu.
```bash
description = "The Zzo theme for Hugo example site."
custom_css = ["css/foo.css", "css/bar.css"]
# body
enableToc = true

View File

@ -25,6 +25,7 @@ rssLimit = 100
[params]
description = "The Zzo theme for Hugo example site."
custom_css = []
# body
enableToc = true

View File

@ -2,3 +2,7 @@
{{ $main_template := resources.Get "sass/main.scss" }}
{{ $main_style := $main_template | resources.ExecuteAsTemplate "main_parsed.scss" . | toCSS $main_options | minify }}
<link rel="stylesheet" href="{{ $main_style.RelPermalink }}">
{{ range .Site.Params.custom_css -}}
<link rel="stylesheet" href="{{ . | absURL }}">
{{- end }}