diff options
author | zzossig <zzossig@gmail.com> | 2020-01-30 15:53:05 +0300 |
---|---|---|
committer | zzossig <zzossig@gmail.com> | 2020-01-30 15:53:05 +0300 |
commit | effa5418170780cf8d1537ff94be0432f334719a (patch) | |
tree | b8885e9075a13b22d50934a26ae1bcbf42d33e1f | |
parent | c869b04e390cf2a4df2f28b954d06ca0b1235c92 (diff) |
comment add
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | exampleSite/config/_default/params.toml | 49 | ||||
-rw-r--r-- | layouts/index.json | 2 | ||||
-rw-r--r-- | layouts/partials/main/sections/list-menu.html | 12 | ||||
-rw-r--r-- | layouts/partials/main/sections/single-menu.html | 12 | ||||
-rw-r--r-- | layouts/partials/main/single.html | 2 | ||||
-rw-r--r-- | static/manifest.json | 8 |
7 files changed, 75 insertions, 26 deletions
@@ -213,12 +213,12 @@ The content here is appeared when you click the manu. So called overview page. ```yaml --- - title: "Content Formats" - description: "test post" - date: 2020-01-28T00:38:51+09:00 - draft: false - weight: 1 - --- + title: "Content Formats" + description: "test post" + date: 2020-01-28T00:38:51+09:00 + draft: false + weight: 1 + --- *Markdown here* @@ -229,7 +229,7 @@ The content here is appeared when you click the manu. So called overview page. `root/content/doc/gettingstarted/_index.md` ```yaml - --- + --- title: "Getting started" description: "test post index" date: 2020-01-28T00:36:39+09:00 @@ -245,7 +245,7 @@ The content here is appeared when you click the manu. So called overview page. - Make more pages in the collapsible section. Something like `Getting Started`, `Installation`, `Basic usage`, etc... For example, make a file at `root/content/doc/gettingstarted/installation.md` ```yaml - --- + --- title: "Frontmatter" description: "test post" date: 2020-01-28T00:36:14+09:00 diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 9d97e69..f4a978d 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -21,4 +21,51 @@ paginateWindow = 1 taxoPaginate = 13 taxoGroupByDate = "2006" # "2006-01": group by month, "2006": group by year -github = "https://github.com/zzossig/hugo-theme-zzo"
\ No newline at end of file +github = "https://github.com/zzossig/hugo-theme-zzo" + +# comment +enableComment = true +disqus_shortname = "" +commento = false + +[gitment] # Gitment is a comment system based on GitHub issues. see https://github.com/imsun/gitment + owner = "" # Your GitHub ID + repo = "" # The repo to store comments + clientId = "" # Your client ID + clientSecret = "" # Your client secret + +[utterances] # https://utteranc.es/ + owner = "" # Your GitHub ID + repo = "" # The repo to store comments + +[gitalk] # Gitalk is a comment system based on GitHub issues. see https://github.com/gitalk/gitalk + owner = "" # Your GitHub ID + repo = "" # The repo to store comments + clientId = "" # Your client ID + clientSecret = "" # Your client secret + +# Valine. +# You can get your appid and appkey from https://leancloud.cn +# more info please open https://valine.js.org +[valine] + enable = false + appId = '你的appId' + appKey = '你的appKey' + notify = false # mail notifier , https://github.com/xCss/Valine/wiki + verify = false # Verification code + avatar = 'mm' + placeholder = '说点什么吧...' + visitor = false + +[changyan] + changyanAppid = "" # Changyan app id # 畅言 + changyanAppkey = "" # Changyan app key + +[livere] + livereUID = "" # LiveRe UID # 来必力 + +# Isso: https://posativ.org/isso/ +[isso] + enable = false + scriptSrc = "" # "https://isso.example.com/js/embed.min.js" + dataAttrs = "" # "data-isso='https://isso.example.com' data-isso-require-author='true'"
\ No newline at end of file diff --git a/layouts/index.json b/layouts/index.json index f4b0feb..367f3b3 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -5,8 +5,6 @@ "uri": "{{ $page.Permalink }}", "title": "{{ htmlEscape $page.Title}}", "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}], - "categories": [{{ range $cindex, $category := $page.Params.categoris }}{{ if $cindex }}, {{ end }}"{{ $category| htmlEscape }}"{{ end }}], - "series": [{{ range $sindex, $series := $page.Params.series }}{{ if $sindex }}, {{ end }}"{{ $series| htmlEscape }}"{{ end }}], "description": "{{ htmlEscape .Description}}", "content": {{$page.Plain | jsonify}} } diff --git a/layouts/partials/main/sections/list-menu.html b/layouts/partials/main/sections/list-menu.html index 91f50f8..dc44d79 100644 --- a/layouts/partials/main/sections/list-menu.html +++ b/layouts/partials/main/sections/list-menu.html @@ -20,16 +20,18 @@ </span> <ul class="menu__list {{ if and (in $currentURL .Permalink) (eq $sectionName1 $sectionName2) }}active{{ end }}"> {{ range .Pages.ByWeight }} - {{ $lastUrlElement := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }} + {{ $lastUrlElement1 := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }} + {{ $lastUrlElement2 := index (last 1 (split (delimit (split $currentURL "/") "," "") ",")) 0 }} <li> - <a href="{{ .Permalink }}" class="menu__title {{ if and (in $currentURL $lastUrlElement) (eq $sectionName1 $sectionName2) }}active{{ end }}">{{ .Title }}</a> + <a href="{{ .Permalink }}" class="menu__title {{ if and (eq $lastUrlElement1 $lastUrlElement2) (eq $sectionName1 $sectionName2) }}active{{ end }}">{{ .Title }}</a> </li> {{ end }} </ul> {{ else }} - {{ $lastUrlElement := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }} - <li class="{{ if in $currentURL $lastUrlElement }}active{{ end }}"> - <a href="{{ .Permalink }}" class="menu__title {{ if in $currentURL $lastUrlElement }}active{{ end }}">{{ .Title }}</a> + {{ $lastUrlElement1 := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }} + {{ $lastUrlElement2 := index (last 1 (split (delimit (split $currentURL "/") "," "") ",")) 0 }} + <li class="{{ if and (eq $lastUrlElement1 $lastUrlElement2) (eq $sectionName1 $sectionName2) }}active{{ end }}"> + <a href="{{ .Permalink }}" class="menu__title {{ if and (eq $lastUrlElement1 $lastUrlElement2) (eq $sectionName1 $sectionName2) }}active{{ end }}">{{ .Title }}</a> </li> {{ end }} {{ end }} diff --git a/layouts/partials/main/sections/single-menu.html b/layouts/partials/main/sections/single-menu.html index 4a1a566..32a706e 100644 --- a/layouts/partials/main/sections/single-menu.html +++ b/layouts/partials/main/sections/single-menu.html @@ -20,16 +20,18 @@ </span> <ul class="menu__list {{ if and (in $currentURL .Permalink) (eq $sectionName1 $sectionName2) }}active{{ end }}"> {{ range .Pages.ByWeight }} - {{ $lastUrlElement := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }} + {{ $lastUrlElement1 := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }} + {{ $lastUrlElement2 := index (last 1 (split (delimit (split $currentURL "/") "," "") ",")) 0 }} <li> - <a href="{{ .Permalink }}" class="menu__title {{ if and (in $currentURL $lastUrlElement) (eq $sectionName1 $sectionName2) }}active{{ end }}">{{ .Title }}</a> + <a href="{{ .Permalink }}" class="menu__title {{ if and (eq $lastUrlElement1 $lastUrlElement2) (eq $sectionName1 $sectionName2) }}active{{ end }}">{{ .Title }}</a> </li> {{ end }} </ul> {{ else }} - {{ $lastUrlElement := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }} - <li class="{{ if and (in $currentURL $lastUrlElement) (eq $sectionName1 $sectionName2) }}active{{ end }}"> - <a href="{{ .Permalink }}" class="menu__title {{ if and (in $currentURL $lastUrlElement) (eq $sectionName1 $sectionName2) }}active{{ end }}">{{ .Title }}</a> + {{ $lastUrlElement1 := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }} + {{ $lastUrlElement2 := index (last 1 (split (delimit (split $currentURL "/") "," "") ",")) 0 }} + <li class="{{ if and (in $lastUrlElement1 $lastUrlElement2) (eq $sectionName1 $sectionName2) }}active{{ end }}"> + <a href="{{ .Permalink }}" class="menu__title {{ if and (in $lastUrlElement1 $lastUrlElement2) (eq $sectionName1 $sectionName2) }}active{{ end }}">{{ .Title }}</a> </li> {{ end }} {{ end }} diff --git a/layouts/partials/main/single.html b/layouts/partials/main/single.html index be26d08..469d671 100644 --- a/layouts/partials/main/single.html +++ b/layouts/partials/main/single.html @@ -14,7 +14,7 @@ {{ partial "main/sections/list-main.html" . }} {{ partial "main/component/pagination-single.html" . }} - + {{ partial "comments/comments.html" . }} </article> <section id="list-side" class="r"> diff --git a/static/manifest.json b/static/manifest.json index 39c69dd..7c31522 100644 --- a/static/manifest.json +++ b/static/manifest.json @@ -1,11 +1,11 @@ { "manifest_version": 2, - "name": "Hugo Zzo theme", - "short_name": "Hugo Zzo theme", + "name": "Hugo Zdoc theme", + "short_name": "Hugo Zdoc theme", "version": "1.0.0", "default_locale": "en", - "description": "Hugo blog theme with rich features", - "start_url": "https://themes.gohugo.io/theme/hugo-theme-zzo/", + "description": "Hugo simple documentation theme", + "start_url": "https://themes.gohugo.io/theme/hugo-theme-zdoc/", "icons": [ { "src": "favicon/android-icon-36x36.png", |