From 4c61dffa99c3844ce757b8ee5fe162a7d453ad08 Mon Sep 17 00:00:00 2001 From: Rise <8315221+AmazingRise@users.noreply.github.com> Date: Wed, 7 Jul 2021 19:30:58 +0800 Subject: Updated Comment Area (markdown) --- Comment-Area.md | 117 -------------------------------------------------------- Comment.md | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 117 deletions(-) delete mode 100644 Comment-Area.md create mode 100644 Comment.md diff --git a/Comment-Area.md b/Comment-Area.md deleted file mode 100644 index 552feb5..0000000 --- a/Comment-Area.md +++ /dev/null @@ -1,117 +0,0 @@ -## Enable or disable comment area - -Now, this theme support these comment service: -- LiveRe -- Gitalk -- Disqus -- Valine -- Twikoo -- Waline - -### Enabling -#### Gitalk -Edit your `config.toml` in the hugo website's root directory. - -Add the following line to the section `[params]` -```toml -enableGitalk = true -``` -Then add following lines behind: -```toml -[params.gitalk] - owner = "user" - repo = "repo name" - client_id = "your client id" - client_secret = "your client secret" -``` -(Modify to suit your condition.) - -Notice: Gitalk will not shown in offline preview server.(Launched by `hugo server`) -#### Disqus - -To add a disqus comment service, please add a line to `config.toml` in the root directory, under `[params]`: - -```toml -[params] -disqusShortname = "Your disqus short name." -``` - -Thanks for [nicholaskajoh](https://github.com/AmazingRise/hugo-theme-diary/issues/51) and [jenlky](https://github.com/AmazingRise/hugo-theme-diary/issues/42)'s feedback. - -#### LiveRe! - -Edit your `config.toml` in the hugo website's root directory. - -Add the following line to the section `[params]` -```toml -livereId = "xxxx" -``` - -"xxxx" stands for the value of `data-uid` in your LiveRe HTML code. - -#### Valine -Edit your `config.toml` in the hugo website's root directory. - -Add the following line to the section `[params]` -```toml -enableValine = true -``` -Then add following lines behind: -```toml -[params.valine] - appId = "Your app ID of leancloud" - appKey = "Your app key of leancloud" - avator = "avator type" -``` - -`avator` is optional. For details, [click here](https://valine.js.org/avatar.html). - -#### Twikoo - -Edit your `config.toml` in the hugo website's root directory. - -Add the following line to the section `[params]` -```toml -enableTwikoo = true -twikooEnvId = "twikoo-YourEnvId" -``` - -Replace YourEnvId with your actual environment id. - -If your Tencent Cloud Environment is deployed in Guangzhou server, don't forget to add this: - -```toml -twikooRegion = "ap-guangzhou" -``` - -#### Waline - -Edit your `config.toml` in the hugo website's root directory. - -Add the following line to the section `[params]` -```toml -walineServer = "https://yourappaddress.vercel.app" -``` - -`walineServer` is corresponding to `serverURL`. - -#### Other comment service - -Welcome to open an issue or Pull Request for adding a new comment service. - -If I'm free then, I will add it. - ---- - -### Disabling -#### Disable the comment area in one post -If you wanna to disable the comment area in a specific post, please add a line in the metadata area of the post: -``` -comment : false -``` -A more detailed description of the posts' meta data is [here](https://github.com/AmazingRise/hugo-theme-diary/wiki/Post's-meta-data). - -#### Disable it globally -Please remove the settings item referred in "Add comment area". - -The comment area will not be shown. \ No newline at end of file diff --git a/Comment.md b/Comment.md new file mode 100644 index 0000000..934b5fa --- /dev/null +++ b/Comment.md @@ -0,0 +1,117 @@ +## Enable or disable comment + +Now, this theme support these comment service: +- LiveRe +- Gitalk +- Disqus +- Valine +- Twikoo +- Waline + +### Enabling +#### Gitalk +Edit your `config.toml` in the hugo website's root directory. + +Add the following line to the section `[params]` +```toml +enableGitalk = true +``` +Then add following lines behind: +```toml +[params.gitalk] + owner = "user" + repo = "repo name" + client_id = "your client id" + client_secret = "your client secret" +``` +(Modify to suit your condition.) + +Notice: Gitalk will not shown in offline preview server.(Launched by `hugo server`) +#### Disqus + +To add a disqus comment service, please add a line to `config.toml` in the root directory, under `[params]`: + +```toml +[params] +disqusShortname = "Your disqus short name." +``` + +Thanks for [nicholaskajoh](https://github.com/AmazingRise/hugo-theme-diary/issues/51) and [jenlky](https://github.com/AmazingRise/hugo-theme-diary/issues/42)'s feedback. + +#### LiveRe! + +Edit your `config.toml` in the hugo website's root directory. + +Add the following line to the section `[params]` +```toml +livereId = "xxxx" +``` + +"xxxx" stands for the value of `data-uid` in your LiveRe HTML code. + +#### Valine +Edit your `config.toml` in the hugo website's root directory. + +Add the following line to the section `[params]` +```toml +enableValine = true +``` +Then add following lines behind: +```toml +[params.valine] + appId = "Your app ID of leancloud" + appKey = "Your app key of leancloud" + avator = "avator type" +``` + +`avator` is optional. For details, [click here](https://valine.js.org/avatar.html). + +#### Twikoo + +Edit your `config.toml` in the hugo website's root directory. + +Add the following line to the section `[params]` +```toml +enableTwikoo = true +twikooEnvId = "twikoo-YourEnvId" +``` + +Replace YourEnvId with your actual environment id. + +If your Tencent Cloud Environment is deployed in Guangzhou server, don't forget to add this: + +```toml +twikooRegion = "ap-guangzhou" +``` + +#### Waline + +Edit your `config.toml` in the hugo website's root directory. + +Add the following line to the section `[params]` +```toml +walineServer = "https://yourappaddress.vercel.app" +``` + +`walineServer` is corresponding to `serverURL`. + +#### Other comment service + +Welcome to open an issue or Pull Request for adding a new comment service. + +If I'm free then, I will add it. + +--- + +### Disabling +#### Disable the comment in one post +If you wanna to disable the comment in a specific post, please add a line in the metadata area of the post: +``` +comment : false +``` +A more detailed description of the posts' meta data is [here](https://github.com/AmazingRise/hugo-theme-diary/wiki/Post's-meta-data). + +#### Disable it globally +Please remove the settings item referred in "Add comment". + +The comment area will not be shown. \ No newline at end of file -- cgit v1.2.3