From 62190dc66b8f591c1fef424bf2392241eb4dd128 Mon Sep 17 00:00:00 2001 From: Rise <8315221+AmazingRise@users.noreply.github.com> Date: Wed, 8 Jan 2020 20:41:27 +0800 Subject: Updated Customization (markdown) --- Customization.md | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/Customization.md b/Customization.md index 7599369..50d43f9 100644 --- a/Customization.md +++ b/Customization.md @@ -9,8 +9,25 @@ Then re-generate the website. You can see the new color scheme now. -## Add comment area -### Gitalk +## Customize sidebar +The items in the sidebar should be added manully. +Here is an example of appeding "Categories" and "Tags" to the sidebar: +``` +[[menu.main]] +url = "/categories" +name = "Categories" +weight = 2 + +[[menu.main]] +url = "/tags" +name = "Tags" +weight = 1 +``` +Note: `weight` is the priority of each item. **The lowest the weight is, the higher the priority is.** + +## Enable or disable comment area +### Enabling +#### Gitalk Edit your `config.toml` in the hugo website's root directory. Add the following line to the section `[params]` @@ -28,7 +45,7 @@ Then add following lines behind: (Modify to suit your condition.) Notice: Gitalk will not shown in offline preview server.(Launched by `hugo server`) -### Disqus +#### Disqus Hugo originally supports Disqus, and I added the disqus to the theme. But due to my network environment, I haven't had it tested. @@ -38,23 +55,24 @@ To add a disqus comment service, please add a line to `config.toml` in the root ``` disqusShortname = "Your disqus short name." ``` -If some bugs happens, please feel free to open an issue or PR. -### Other comment service +#### 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. :P -## Disable the comment area -### Disable the comment area in one post +--- + +### 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 +#### Disable it globally Please remove the settings item referred in "Add comment area". The comment area will not be shown. -- cgit v1.2.3