Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/carsonip/hugo-theme-minos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarson Ip <carsonip715@gmail.com>2019-12-01 17:55:22 +0300
committerCarson Ip <carsonip715@gmail.com>2019-12-01 17:55:22 +0300
commit45891eec00833649729f2995fda86627954a6ff6 (patch)
tree31ed46000dac008c1010f718b93d0646adc8031c
parent4856422a5873ae07e265b6abd042d1fa813f5484 (diff)
Add param for custom CSS
Fix #36
-rw-r--r--README.md6
-rw-r--r--layouts/partials/head.html3
2 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index 90e53d1..668a7f9 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,12 @@ disqusShortname = "xxxxxx"
This option enables the KaTeX auto-render extension. To render block math, use `$$ ... $$`. For inline math, use `\\( ... \\)`. For more details, please refer to https://github.com/KaTeX/KaTeX/blob/v0.7.1/contrib/auto-render/auto-render.js#L73 .
+### Custom CSS
+```
+[params]
+ customCss = ["css/foo.css"]
+```
+
### Others
For other configuration variables, visit [Hugo documentation](https://gohugo.io/overview/configuration/#configuration-variables).
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index e2b9c57..de28d1b 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -15,6 +15,9 @@
<link href="{{ "webfonts/source-code-pro/main.css" | absURL }}" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{{ "css/style.css" | absURL }}">
+ {{ range .Site.Params.customCss -}}
+ <link rel="stylesheet" href="{{ . | absURL }}">
+ {{- end }}
{{ hugo.Generator }}
</head>