From 63433dd64a35ef1a45301849ee9550b1f74fefd4 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Wed, 3 Jun 2020 14:04:29 +0800 Subject: Update DisqusJS default settings --- README.md | 4 ++-- README_CN.md | 4 ++-- layouts/partials/comment-disqusjs.html | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a274f7c..910bee8 100644 --- a/README.md +++ b/README.md @@ -139,9 +139,9 @@ You can use `[SITEROOT]/layouts/_default/_markup/render-link.html` to decide whe 对于 Disqus 默认情况下使用 `{{ .Permalink }}` 作为 `url`,使用 `{{ .File.ContentBaseName }}` 作为 `identifier`。 -Use the `[SITEROOT]/layouts/partials/comment-*.html` to cover `themes/fuji/layouts/partials/comment-*.html`. Then you can customize the url and identifier, or set multiple api key for using DisqusJS. If you want to use DisqusJS, please remember to set `disqusJSApi` to anything in your `config.toml` to load CSS. +Use the `[SITEROOT]/layouts/partials/comment-*.html` to cover `themes/fuji/layouts/partials/comment-*.html`. Then you can customize the url and identifier, or set multiple api key, add more settings for using DisqusJS. If you want to use DisqusJS, please remember to set `disqusJSApi` to anything in your `config.toml` to load CSS. -You can check my blog for example of using DisqusJS, remember to set to your own key when deploing: +You can check my blog for example of using DisqusJS and add more settings and api keys, remember to set to your own key when deploing: - [`config.toml`]() - [`comment-disqusjs.html`]() diff --git a/README_CN.md b/README_CN.md index a3d006e..cfc650b 100644 --- a/README_CN.md +++ b/README_CN.md @@ -130,9 +130,9 @@ playerCover = "..." # 封面 对于 Disqus 默认情况下使用 `{{ .Permalink }}` 作为 `url`,使用 `{{ .File.ContentBaseName }}` 作为 `identifier`。 -使用 `[SITEROOT]/layouts/partials/comment-*.html` 来覆盖 `themes/fuji/layouts/partials/comment-*.html`。可在此文件内自定义指定的 url 和 identifier,或者为 DisqusJS 设置多个 api key。注意如果使用 DisqusJS,将 `config.toml` 内的 `disqusJSApi` 解除注释来加载 CSS。 +使用 `[SITEROOT]/layouts/partials/comment-*.html` 来覆盖 `themes/fuji/layouts/partials/comment-*.html`。可在此文件内自定义指定的 url 和 identifier,或者为 DisqusJS 设置多个 api key 抑或是添加更多设置。注意如果使用 DisqusJS,将 `config.toml` 内的 `disqusJSApi` 解除注释来加载 CSS。 -可以参考 Demo 的设置作为使用 DisqusJS 的例子,记得最后部署时候修改为自己的设置和 key 哦: +可以参考 Demo 的设置作为使用 DisqusJS、并且自定义设置和多个 api key 的例子,记得最后部署时候修改为自己的设置和 key 哦: - [`config.toml`]() - [`comment-disqusjs.html`]() diff --git a/layouts/partials/comment-disqusjs.html b/layouts/partials/comment-disqusjs.html index 5414aef..ebede31 100644 --- a/layouts/partials/comment-disqusjs.html +++ b/layouts/partials/comment-disqusjs.html @@ -14,9 +14,7 @@ url: '{{ .Permalink }}', title: '{{ .Title }}', api: '{{ .Site.Params.disqusJSApi }}', - apikey: '{{ .Site.Params.disqusJSApikey }}', - admin: '{{ .Site.Params.disqusJSAdmin }}', - adminLabel: '{{ .Site.Params.disqusJSAdminlabel }}' + apikey: '{{ .Site.Params.disqusJSApikey }}' }); document.querySelector('span.post-comment-notloaded').setAttribute('style', 'display: none;'); } -- cgit v1.2.3