From f7eb2aadd387652dde1c3d8bc68dc09f0345d9a0 Mon Sep 17 00:00:00 2001 From: imzeuk Date: Fri, 19 Apr 2019 09:32:49 +0800 Subject: modify any --- README.md | 1 + exampleSite/config.toml | 27 +++++++++++++++------------ layouts/partials/head.html | 12 ++++++------ layouts/partials/js.html | 6 +++++- layouts/partials/post.html | 2 +- 5 files changed, 28 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 4d26863..bed76de 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ A simple and beautiful theme for Hugo + **Archive page** + **[Valine](https://valine.js.org/en/index.html) comment-system** + **Fancybox** ++ **GoogleAnalytics** [Demo](https://demo.zeuk.me) | [中文说明](./README-zh.md) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0eb011a..f2d4cd1 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,20 +1,21 @@ baseURL = "https://example.com" languageCode = "zh-cn" defaultContentLanguage = "zh-cn" -title = "无尽光芒" # 网站标题 +title = "无尽光芒" # site title # 网站标题 theme = "zozo" -hasCJKLanguage = true # has chinese/japanese/korean ? # 自动检测是否包含 中文\日文\韩文 +hasCJKLanguage = true # has chinese/japanese/korean ? # 自动检测是否包含 中文\日文\韩文 summaryLength = 100 -paginate = 4 # 首页显示文章数量 +paginate = 4 # shows the number of articles # 首页显示文章数量 enableEmoji = true +googleAnalytics = "" # your google analytics id -[author] # essential # 必需 +[author] # essential # 必需 name = "Zeuk" [blackfriday] smartypants = false -[[menu.main]] # config your menu 配置菜单 +[[menu.main]] # config your menu # 配置菜单 name = "首页" weight = 10 identifier = "home" @@ -36,16 +37,18 @@ enableEmoji = true url = "/about/" [params] - subTitle = "the site subtitle" # 网站二级标题 - footerSlogan = "我的精神家园" # 网站页脚标语 - keywords = ["Hugo", "theme","zozo"] # 网站关键字 - description = "Hugo theme zozo example site." # 网站描述 + subTitle = "the site subtitle" # site's subTitle # 网站二级标题 + footerSlogan = "我的精神家园" # site's footer slogan # 网站页脚标语 + keywords = ["Hugo", "theme","zozo"] # site's keywords # 网站关键字 + description = "Hugo theme zozo example site." # site's description # 网站描述 - # mathjax - mathjax = true # 是否使用mathjax(数学公式) +# mathjax + enableMathJax = true # enable mathjax # 是否使用mathjax(数学公式) - summaryDisplay = true # 是否显示文章摘要 + enableSummary = true # display the article summary # 是否显示文章摘要 + enableGoogleAnalytics = true # enable google analytics # 谷歌统计 + # Valine. # You can get your appid and appkey from https://leancloud.cn # more info please open https://valine.js.org diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 91648af..5091654 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -34,14 +34,14 @@ {{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} · {{ .Site.Title }}{{ end }} - - - - - + + + + + {{ range .Site.Params.customCSS }} - + {{ end }} diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 99b00f1..cb16026 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -6,6 +6,10 @@ -{{ if .Site.Params.mathjax }} +{{ if .Site.Params.enableMathJax }} {{ partial "mathjax.html" . }} {{ end }} + +{{ if .Site.Params.enableGoogleAnalytics }} + {{ template "_internal/google_analytics_async.html" . }} +{{ end }} diff --git a/layouts/partials/post.html b/layouts/partials/post.html index c22cc50..c19f4f7 100644 --- a/layouts/partials/post.html +++ b/layouts/partials/post.html @@ -5,7 +5,7 @@

{{ .Title }}

- {{ if .Site.Params.summaryDisplay }} + {{ if .Site.Params.enableSummary }}

{{ .Summary }}......

-- cgit v1.2.3