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:
authoryx.z <xiaohei.zyx@gmail.com>2019-12-31 16:40:16 +0300
committerGitHub <noreply@github.com>2019-12-31 16:40:16 +0300
commit3cb9f9f4be04e371a0e04476eef74a7327cde49b (patch)
treec09bdf496cfaae384cb4045444e5e96f071d0a7b
parent546fb9345bd722cf46bd1b705b22ae839d9684e2 (diff)
parent30ac2064dea728d41b3adf6dce68fbb570301816 (diff)
Merge pull request #67 from ssbarnea/master2
Allow custom stlyesheet
-rw-r--r--exampleSite/config.yml5
-rw-r--r--i18n/en.yaml4
-rw-r--r--i18n/zh.yaml4
-rw-r--r--layouts/partials/head.html7
-rw-r--r--layouts/partials/post/wc.html4
5 files changed, 15 insertions, 9 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/i18n/en.yaml b/i18n/en.yaml
index 1a90540..a9d3d0c 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -84,9 +84,9 @@ unit_time:
other: minutes
article_wordcount:
- other: Word Count
+ other: "Word Count: "
article_readcount:
- other: Read Count
+ other: "Read Count: "
article_more:
other: Read More
article_comments:
diff --git a/i18n/zh.yaml b/i18n/zh.yaml
index 755094a..8794876 100644
--- a/i18n/zh.yaml
+++ b/i18n/zh.yaml
@@ -88,9 +88,9 @@ unit_time:
other: 分
article_wordcount:
- other: 字数统计
+ other: "字数统计: "
article_readcount:
- other: 阅读时长
+ other: "阅读时长: "
article_more:
other: 查看更多
article_comments:
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" . -}}
diff --git a/layouts/partials/post/wc.html b/layouts/partials/post/wc.html
index 4f5a66f..f582be6 100644
--- a/layouts/partials/post/wc.html
+++ b/layouts/partials/post/wc.html
@@ -2,9 +2,9 @@
{{- $page := .Page}}
{{- with $postCount.enable }}
{{- with $postCount.wordcount }}
- <span class="post-wordcount hidden-xs" itemprop="wordCount">{{ T "article_wordcount" -}}: {{- $page.WordCount }}{{ T "unit_word" }}</span>
+ <span class="post-wordcount hidden-xs" itemprop="wordCount">{{ T "article_wordcount" -}}{{- $page.WordCount }}{{ T "unit_word" }}</span>
{{- end }}
{{- with $postCount.min2read }}
- <span class="post-readcount hidden-xs" itemprop="timeRequired">{{ T "article_readcount" }}: {{- $page.ReadingTime }}{{ T "unit_time" }} </span>
+ <span class="post-readcount hidden-xs" itemprop="timeRequired">{{ T "article_readcount" }}{{- $page.ReadingTime }}{{ T "unit_time" }} </span>
{{- end }}
{{- end }} \ No newline at end of file