Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Customization.md - github.com/AmazingRise/hugo-theme-diary.wiki.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 90d4b2df7ab1935cd64d3b073e53e23d242a3d35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
## Change color scheme
(From *theme*'s root directory) Go to `assets/scss/journal.scss`.

And modify the color value in the first line.
```
$color-accent: #1976d2;
```
Then re-generate the website.

You can see the new color scheme now.

## 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.**

## Disable Table of Contents

Add `disableToC=true` to the section of `[param]` in your `config.toml`.
Then you will not see the `table of contents`.

## 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]`
```
enableGitalk = true
```
Then add following lines behind:
```
[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:

```
disqusShortname = "Your disqus short name."
```

#### 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":

```
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":

```
googleSiteVerification = "xxxx-xxxx"
```

xxxx-xxxx is your Google Site Verification code. Please modify it to your own code.