zzossig 5 anos atrás
pai
commit
effa541817

+ 8 - 8
README.md

@@ -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

+ 48 - 1
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"
+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'"

+ 0 - 2
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}}
 }

+ 7 - 5
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 }}

+ 7 - 5
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 }}

+ 1 - 1
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">

+ 4 - 4
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",