## About Copyright This theme is under MIT license, that means users have correspoding rights and obligations. According to this license, you should **keep the copyright declaration of theme makers** at the footer. Thank you for your support! ## Table of Contents * [Change color scheme](https://github.com/AmazingRise/hugo-theme-diary/wiki/Customization#change-color-scheme) * [Change font scheme](https://github.com/AmazingRise/hugo-theme-diary/wiki/Customization#change-default-font-scheme) * [Customize sidebar](https://github.com/AmazingRise/hugo-theme-diary/wiki/Customization#customize-sidebar) * [Disable Table of Contents](https://github.com/AmazingRise/hugo-theme-diary/wiki/Customization#disable-table-of-contents) * [Add or disable comment area](https://github.com/AmazingRise/hugo-theme-diary/wiki/Customization#add-comment-area) * [Add Google Analytics and Site Verification](https://github.com/AmazingRise/hugo-theme-diary/wiki/Customization#add-google-analytics) ## Change color scheme (From *theme*'s root directory) Go to `assets/scss/journal.scss`. And modify the color value in the first line. ```scss $color-accent: #1976d2; ``` Then re-generate the website. You can see the new color scheme now. ## Change default font scheme Edit `/assets/scss/journal.scss`. Then you can find font scheme in the first page: ```scss $default-font-list: "Lora", "Noto Serif SC", serif; $mono-font-list: "Fira Mono", "Cousine", Monaco, Menlo, "Source Code Pro", monospace; $sans-preferred-font-list: "Montserrat", "Roboto", "Source Sans Pro", "Helvetica", $default-font-list; ``` And don't forget to modify `/layouts/partials/head.html`: ```html ``` Modify your font, and don't forget to replace `Space` with `+`. ## Customize sidebar The items in the sidebar should be added manully. Here is an example of appeding "Categories" and "Tags" to the sidebar: ```toml [[menu.main]] url = "/categories" name = "Categories" weight = 3 [[menu.main]] url = "/tags" name = "Tags" weight = 2 [[menu.main]] url = "/posts" name = "Archive" weight = 1 ``` Note: `weight` is the priority of each item. **The lowest the weight is, the higher the priority is.** ## Disable Table of Contents ### Globally Add `disableToC=true` to the section of `[param]` in your `config.toml`. Then you will not see it. ### Apply for single page Add `disableToC: true` in the front matter of the page. Then you will disable it in the very page. ## Enable or disable comment area Now, this theme support these comment service: - LiveRe - Gitalk - Disqus - Valine ### 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 Hugo originally supports Disqus, and I added the disqus to the theme. But due to my network environment, I haven't had it tested. To add a disqus comment service, please add a line to `config.toml` in the root directory: ```toml disqusShortname = "Your disqus short name." ``` #### 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). #### 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 --- ### 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. ## Add Google Analytics Please add this line to your site's "config.toml": ```toml googleAnalytics = "UA-123-45" ``` UA-123-45 is your Google Analytics code. Please modify it to your own Analytics code. ## Add Google Site Verification Please add this line to your site's "config.toml": ```toml googleSiteVerification = "xxxx-xxxx" ``` xxxx-xxxx is your Google Site Verification code. Please modify it to your own code.