{{ page.title | escape }}
{{ content }}
- {%- if site.disqus.shortname -%}
- {%- include disqus_comments.html -%}
+ {%- if site.comments.provider -%}
+ {%- include comments.html -%}
{%- endif -%}
From adf3ddb13a988d9d602220ecaec78e393ea792ea Mon Sep 17 00:00:00 2001
From: "Sun Yuhao(Justin Sun)" <77920708+YURLAK@users.noreply.github.com>
Date: Tue, 3 Jan 2023 08:37:06 +0800
Subject: [PATCH 2/7] Update comments.html
---
_includes/comments.html | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/_includes/comments.html b/_includes/comments.html
index dcbeeae4a2..fa9bfd9231 100644
--- a/_includes/comments.html
+++ b/_includes/comments.html
@@ -2,7 +2,20 @@
{% if provider == "disqus" %}
{% assign disqus = site.disqus | default:site.disqus_shortname %}
{% if disqus %}
-
+
+
+
{% endif %}
{% elsif provider == "utterances" %}
{% assign utterances = site.utterances %}
From a5728b67e37a584dea0138e1ee428695c9fd713c Mon Sep 17 00:00:00 2001
From: "Sun Yuhao(Justin Sun)" <77920708+YURLAK@users.noreply.github.com>
Date: Tue, 3 Jan 2023 08:37:47 +0800
Subject: [PATCH 3/7] Update _config.yml
---
_config.yml | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/_config.yml b/_config.yml
index 22587f601f..689fd1a017 100644
--- a/_config.yml
+++ b/_config.yml
@@ -37,34 +37,6 @@ minima:
#header_pages:
# - about.md
-# Set which comment system to use
-comments:
- # 'disqus' / 'giscus' / 'utterances' are available
- provider: # choice your comment system
-
-# You must install utterances github app before use.(https://github.com/apps/utterances)
-# Make sure all variables are set properly. Check below link for detail.
-# https://utteranc.es/
-utterances:
- repo: "username/username.github.io"
- issue-term: "pathname"
- label: "Comments"
- theme: "your_theme"
-
-# You must install giscus github app before use.(https://github.com/apps/giscus)
-# Make sure all variables are set properly. Check below link for detail.
-# https://giscus.vercel.app/
-giscus:
- repo: "username/username.github.io"
- repo-id: "your_repo_id"
- category: "your_category"
- category-id: "your_category_id"
- mapping: "pathname"
- reaction-enabled: "1"
- theme: "your_theme"
- crossorigin: "your_crossorigin"
- lang: "your_language"
-
# Build settings
theme: minima
From 792d6b6f19e1db5723c123db5f6984f1ad12da9a Mon Sep 17 00:00:00 2001
From: "Sun Yuhao(Justin Sun)" <77920708+YURLAK@users.noreply.github.com>
Date: Tue, 3 Jan 2023 09:35:36 +0800
Subject: [PATCH 4/7] Update README.md
---
README.md | 47 ++++++++++++++++++++++++++++++++---------------
1 file changed, 32 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 1b32026c30..543a1e729d 100644
--- a/README.md
+++ b/README.md
@@ -222,24 +222,41 @@ You can *add* custom metadata to the `
` of your layouts by creating a fi
2. [Customize](#customization) default `_includes/custom-head.html` in your source directory and insert the given code snippet.
-### Enabling comments (via Disqus)
+### Enabling comments (via Disqus,Utterances,Giscus)
-Optionally, if you have a Disqus account, you can tell Jekyll to use it to show a comments section below each post.
+If you want to add comment system for your site,add the following code to the `README.md` file.If not,skip this part.
-:warning: `url`, e.g. `https://example.com`, must be set in you config file for Disqus to work.
-
-To enable it, after setting the url field, you also need to add the following lines to your Jekyll site:
-
-```yaml
- disqus:
- shortname: my_disqus_shortname
```
-
-You can find out more about Disqus' shortnames [here](https://help.disqus.com/installation/whats-a-shortname).
-
-Comments are enabled by default and will only appear in production, i.e., `JEKYLL_ENV=production`
-
-If you don't want to display comments for a particular post you can disable them by adding `comments: false` to that post's YAML Front Matter.
+# Set which comment system to use
+comments:
+ # 'disqus' / 'giscus' / 'utterances' are available
+ provider: # choice your comment system
+
+# You must install utterances github app before use.(https://github.com/apps/utterances)
+# Make sure all variables are set properly. Check below link for detail.
+# https://utteranc.es/
+utterances:
+ repo: "username/username.github.io"
+ issue-term: "pathname"
+ label: "Comments"
+ theme: "your_theme"
+
+# You must install giscus github app before use.(https://github.com/apps/giscus)
+# Make sure all variables are set properly. Check below link for detail.
+# https://giscus.app/
+giscus:
+ repo: "username/username.github.io"
+ repo-id: "your_repo_id"
+ category: "your_category"
+ category-id: "your_category_id"
+ mapping: "pathname"
+ reaction-enabled: "1"
+ theme: "your_theme"
+ crossorigin: "your_crossorigin"
+ lang: "your_language"
+ ```
+
+ :warning.First,you need to enter the name of your comment system into the `provider` option.Second,enter the configurations of your comment system.
### Author Metadata
From 225b5b7353c88a9e78aaafe08a6c50e541bb928c Mon Sep 17 00:00:00 2001
From: "Sun Yuhao(Justin Sun)" <77920708+YURLAK@users.noreply.github.com>
Date: Tue, 3 Jan 2023 09:40:23 +0800
Subject: [PATCH 5/7] Update README.md
---
README.md | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 543a1e729d..751d1be329 100644
--- a/README.md
+++ b/README.md
@@ -231,6 +231,10 @@ If you want to add comment system for your site,add the following code to the `R
comments:
# 'disqus' / 'giscus' / 'utterances' are available
provider: # choice your comment system
+
+ #Disqus
+ disqus:
+ shortname: my_disqus_shortname
# You must install utterances github app before use.(https://github.com/apps/utterances)
# Make sure all variables are set properly. Check below link for detail.
@@ -256,7 +260,7 @@ giscus:
lang: "your_language"
```
- :warning.First,you need to enter the name of your comment system into the `provider` option.Second,enter the configurations of your comment system.
+ :warning: First,you need to enter the name of your comment system into the `provider` option(`giscus`,`utterances` or `disqus`).Second,enter the configurations of your comment system.
### Author Metadata
From 5e5548153d58465a8d2e6a0794541eaf09218e3c Mon Sep 17 00:00:00 2001
From: "Sun Yuhao(Justin Sun)" <77920708+YURLAK@users.noreply.github.com>
Date: Mon, 9 Jan 2023 09:41:41 +0800
Subject: [PATCH 6/7] Update README.md
Co-authored-by: Louis Royer <55180044+louisroyer@users.noreply.github.com>
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 751d1be329..ec6182adfa 100644
--- a/README.md
+++ b/README.md
@@ -222,7 +222,7 @@ You can *add* custom metadata to the `