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

github.com/xiaoheiAh/hugo-theme-pure.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSorin Sbarnea <ssbarnea@redhat.com>2019-12-31 14:05:57 +0300
committerSorin Sbarnea <ssbarnea@redhat.com>2019-12-31 14:45:19 +0300
commit30ac2064dea728d41b3adf6dce68fbb570301816 (patch)
treec09bdf496cfaae384cb4045444e5e96f071d0a7b
parentad0c418ab9c8f5b1dcc8af0508a7f165b025f42a (diff)
Allow custom stylesheet
Fixes: #54
-rw-r--r--exampleSite/config.yml5
-rw-r--r--layouts/partials/head.html7
2 files changed, 9 insertions, 3 deletions
diff --git a/exampleSite/config.yml b/exampleSite/config.yml
index 32d16c9..819b981 100644
--- a/exampleSite/config.yml
+++ b/exampleSite/config.yml
@@ -74,7 +74,10 @@ params:
enableMathJax: true #Enable mathjax support, to use mathematical notations
highlightjs:
langs: ["python", "javascript","ini"] # refer to http://staticfile.org/, search highlight.js, already have highlight.min.js
-
+
+ # Allows you to specify an override stylesheet
+ # customCSS: css/custom.css
+
menuIcons:
enable: true # 是否启用导航菜单图标
home: icon-home-fill
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 3119aec..6d80b6a 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -53,10 +53,13 @@
<link rel="stylesheet" href="{{ "css/style.css" | absURL }}">
<link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/9.15.10/styles/github.min.css">
- {{- if eq .Site.Params.comment.type "gitalk"}}
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
+ {{- if eq .Site.Params.comment.type "gitalk"}}
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
{{- end }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.css">
+ {{ with .Site.Params.customCSS }}
+ <link rel="stylesheet" href="{{ . | absURL }}">{{ end }}
+
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L158 */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}