diff options
author | Carson Ip <carsonip715@gmail.com> | 2019-12-01 17:55:22 +0300 |
---|---|---|
committer | Carson Ip <carsonip715@gmail.com> | 2019-12-01 17:55:22 +0300 |
commit | 45891eec00833649729f2995fda86627954a6ff6 (patch) | |
tree | 31ed46000dac008c1010f718b93d0646adc8031c | |
parent | 4856422a5873ae07e265b6abd042d1fa813f5484 (diff) |
Add param for custom CSS
Fix #36
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -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> |