From da23836b5dfe2d39cda0d89768dadd59b22a9baf Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Mon, 1 Jun 2020 21:49:10 +0800 Subject: DisqusJS support added --- README.md | 11 +++++++++-- assets/scss/_fuji-style/_content.scss | 4 ++++ layouts/partials/comment-disqus.html | 6 +++--- layouts/partials/head.html | 3 +++ static/assets/css/fuji.min.css | 2 +- static/assets/css/fuji.min.css.map | 2 +- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 093748a..84df2dd 100644 --- a/README.md +++ b/README.md @@ -159,9 +159,16 @@ Set `customHighlight` to `true` in `config.toml`, then set `customHighlightURL` Check [Getting highlight.js](https://highlightjs.org/download/) to download you own bundle of highlight.js. -### Disqus identifier +### Disqus -Use the `[SITEROOT]/layouts/partials/comment-disqus.html` to cover `themes/fuji/layouts/partials/comment-disqus.html`. +By default theme use these as identifier: + +```js +this.page.url = {{ $.Permalink }}; +this.page.identifier = {{ $.File.ContentBaseName }}; +``` + +Use the `[SITEROOT]/layouts/partials/comment-disqus.html` to cover `themes/fuji/layouts/partials/comment-disqus.html`. Then you can customize the url and identifier, or switch to DisqusJS for accessing from Mainland China. If you want to use DisqusJS, please also remember to set `useDisqusJS = true` in your `config.toml` to load CSS. ## Contributing diff --git a/assets/scss/_fuji-style/_content.scss b/assets/scss/_fuji-style/_content.scss index fcb4f3b..e45658b 100644 --- a/assets/scss/_fuji-style/_content.scss +++ b/assets/scss/_fuji-style/_content.scss @@ -159,3 +159,7 @@ article { margin: 0 0.25rem 0.5rem 0.25rem; } } + +#disqus_thread { + padding: 1.25rem 0; +} diff --git a/layouts/partials/comment-disqus.html b/layouts/partials/comment-disqus.html index 539f8c7..75b3f4c 100644 --- a/layouts/partials/comment-disqus.html +++ b/layouts/partials/comment-disqus.html @@ -3,13 +3,13 @@