diff options
author | jesselau76 <jesselau76@gmail.com> | 2018-11-28 10:46:28 +0300 |
---|---|---|
committer | jesselau76 <jesselau76@gmail.com> | 2018-11-28 10:46:28 +0300 |
commit | cc3e6d467ed184af4c85c04942c3b4b5cecc3aec (patch) | |
tree | 583b25f69427a9e6b0547385a609f20c839da902 | |
parent | 40084973778760a9a9f626b172edba73812680e8 (diff) |
isso comment system support
-rw-r--r-- | README-zh.md | 3 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | exampleSite/config.toml | 4 | ||||
-rw-r--r-- | i18n/en.yaml | 3 | ||||
-rw-r--r-- | i18n/zh-cn.yaml | 3 | ||||
-rw-r--r-- | layouts/partials/comments.html | 16 | ||||
-rw-r--r-- | layouts/shortcodes/quote.html | 2 |
7 files changed, 30 insertions, 3 deletions
diff --git a/README-zh.md b/README-zh.md index e1b693f..f9219fd 100644 --- a/README-zh.md +++ b/README-zh.md @@ -5,6 +5,7 @@ + # Hugo W3 SIMPLE @@ -18,7 +19,7 @@ - W3 code color js - 也是小而快的代码高亮模块。 - Twitter Card - Google Analytics - - Disqus评论系统 + - Disqus 或isso评论系统,[isso中文安装教程](https://jesselau.com/install-isso-nginx-hugo/) - One Signal Push - 书签及共享按钮条,大屏幕时常位于左侧,中小屏幕位于帖子下方。 - 当前版本四种快捷方式:Info, Warning, Colorcode, quote. [演示](https://jesselau.com/hugo-w3-simple-shortcodes-demo/ @@ -20,7 +20,7 @@ - W3 code color js - small and fast code highlight solution. - Twitter Card - Google Analytics - - Disqus + - Disqus or isso comment system - One Signal Push - Social share & Bookmark bar - Shortcodes:Info, Warning, Colorcode, quote. [Demo Here](https://jesselau.com/w3-simple-shortcodes-demo/) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 1b9a8fa..63568d8 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -16,6 +16,8 @@ contentDir = "content/english" authorinfo = "<h4>Authored By John Doe</h4>" licenseinfo = "<p class=\"w3-small\">John Doe, a good man living on the earth, loving making website with hugo. This article is licensed under a <a rel=\"license\" href=\"https://creativecommons.org/licenses/by/4.0/\" class=\"w3-text-white\">Creative Commons Attribution 4.0 International License</a>.</p>" logotext = "HUGO W3 SIMPLE" # logo text + isso_baseurl="" #if you want to use isso as comment system,set your isso js baseurl here. It is like "https://isso.yourwebsite.com/" or "https://yourwebsite.com/isso/" + isso_langcode="en" [[languages.en.menu.main]] name = "About" @@ -50,6 +52,8 @@ contentDir = "content/chinese" authorinfo = "<h4>本文由王一贴原创</h4>" licenseinfo = '<p class="w3-small">王一贴,曾记录于《红楼梦》第八十回人物。任何问题,一贴搞定.<br>本文采用<a rel="license" href="http://creativecommons.org/licenses/by/4.0/" class="w3-text-white">知识共享署名 4.0 国际许可协议</a>进行许可。</p>' logotext = "王一贴的博客" # logo text + isso_baseurl="" ##if you want to use isso as comment system,set your isso js baseurl here. It is like "https://isso.yourwebsite.com/" or "https://yourwebsite.com/isso/" + isso_langcode="zh" [[languages.zh-cn.menu.main]] name = "关于" url = "/zh-cn/about/" diff --git a/i18n/en.yaml b/i18n/en.yaml index 9d858f8..063447d 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -65,3 +65,6 @@ postssearch: relatedposts: other: "Related Articles:" + +issocomment: + other: "Post Your Comments Here:" diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 63eba3c..4cb2c07 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -67,3 +67,6 @@ postssearch: relatedposts: other: "相关文章:" +issocomment: + other: "留点评论吧:" + diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 3d0d99a..53b55f0 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -17,6 +17,22 @@ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> {{- end -}} + <!-- isso --> + {{- if .Site.Params.isso_baseurl -}} + <div class="w3-panel w3-border w3-light-grey w3-round-large"> + <i class="fa fa-commenting w3-xxxlarge "></i><br> + <p class="w3-xlarge">{{ T "issocomment" }}</p> + </div> + <script data-isso="{{ .Site.Params.isso_baseurl }}" + {{ with .Site.Params.isso_langcode }} + data-isso-lang="{{ . }}" + {{ end }} + src="{{ .Site.Params.isso_baseurl }}js/embed.min.js"></script> + + <section id="isso-thread"></section> + + {{- end -}} + {{- end }} diff --git a/layouts/shortcodes/quote.html b/layouts/shortcodes/quote.html index beb3355..b54df15 100644 --- a/layouts/shortcodes/quote.html +++ b/layouts/shortcodes/quote.html @@ -1,6 +1,6 @@ <div class="w3-panel w3-card-4 w3-light-grey"{{ with .Get "width"}} style="width:{{.}}"{{ end }}> <i class="fa fa-quote-right w3-xxlarge w3-text-red"></i><br> - <p class=" w3-xxlarge"> + <p class=" w3-large"> {{ .Inner }} </p> {{ with .Get "author"}} |