Skip to content

Commit ca6fde2

Browse files
committed
refactor: simplify and format TOML configuration files
1 parent 5665895 commit ca6fde2

8 files changed

Lines changed: 78 additions & 175 deletions

File tree

config/_default/_languages.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Rename this file to languages.toml to enable multilingual support
22
[en]
3-
languageName = "English"
4-
languagedirection = "ltr"
5-
title = "Example Site"
6-
weight = 1
3+
languageName = "English"
4+
languagedirection = "ltr"
5+
title = "Example Site"
6+
weight = 1

config/_default/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Change baseurl before deploy
2-
baseurl = "https://caijimmy.github.io/hugo-theme-stack-starter/"
2+
baseurl = "https://caijimmy.github.io/hugo-theme-stack-starter/"
33
languageCode = "en-us"
4-
title = "Hugo Theme Stack Starter"
4+
title = "Hugo Theme Stack Starter"
55

66
# Theme i18n support
7-
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, zh-tw, es, de, nl, it, th, el, uk, ar
7+
# See all available values at https://github.com/CaiJimmy/hugo-theme-stack/tree/master/i18n
88
defaultContentLanguage = "en"
99

1010
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
@@ -15,4 +15,4 @@ hasCJKLanguage = false
1515
disqusShortname = "hugo-theme-stack"
1616

1717
[pagination]
18-
pagerSize = 5
18+
pagerSize = 5

config/_default/markup.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# Markdown renderer configuration
22
[goldmark.renderer]
3-
unsafe = true
3+
unsafe = true
44

55
[goldmark.extensions.passthrough]
6-
enable = true
6+
enable = true
77

8-
# LaTeX math support
9-
# https://gohugo.io/content-management/mathematics/
10-
[goldmark.extensions.passthrough.delimiters]
11-
block = [['\[', '\]'], ['$$', '$$']]
12-
inline = [['\(', '\)']]
8+
# LaTeX math support
9+
# https://gohugo.io/content-management/mathematics/
10+
[goldmark.extensions.passthrough.delimiters]
11+
block = [['\[', '\]'], ['$$', '$$']]
12+
inline = [['\(', '\)']]
1313

1414
[tableOfContents]
15-
endLevel = 4
16-
ordered = true
17-
startLevel = 2
15+
endLevel = 4
16+
ordered = true
17+
startLevel = 2
1818

1919
[highlight]
20-
noClasses = false
21-
codeFences = true
22-
guessSyntax = true
23-
lineNoStart = 1
24-
lineNos = true
25-
lineNumbersInTable = true
26-
tabWidth = 4
20+
noClasses = false
21+
codeFences = true
22+
guessSyntax = true
23+
lineNoStart = 1
24+
lineNos = true
25+
lineNumbersInTable = true
26+
tabWidth = 4

config/_default/menu.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
#newtab = true
99

1010
[[social]]
11-
identifier = "github"
12-
name = "GitHub"
13-
url = "https://github.com/CaiJimmy/hugo-theme-stack"
11+
identifier = "github"
12+
name = "GitHub"
13+
url = "https://github.com/CaiJimmy/hugo-theme-stack"
1414

15-
[social.params]
16-
icon = "brand-github"
15+
[social.params]
16+
icon = "brand-github"
1717

1818
[[social]]
19-
identifier = "twitter"
20-
name = "Twitter"
21-
url = "https://twitter.com"
19+
identifier = "twitter"
20+
name = "Twitter"
21+
url = "https://twitter.com"
2222

23-
[social.params]
24-
icon = "brand-twitter"
23+
[social.params]
24+
icon = "brand-twitter"

config/_default/module.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[[imports]]
2-
path = "github.com/CaiJimmy/hugo-theme-stack/v4"
2+
path = "github.com/CaiJimmy/hugo-theme-stack/v4"

config/_default/params.toml

Lines changed: 35 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -2,149 +2,55 @@
22
mainSections = ["post"]
33
# Output page's full content in RSS.
44
rssFullContent = true
5-
favicon = "/favicon.png"
5+
favicon = "/favicon.png"
66

77
[footer]
8-
since = 2020
9-
customText = ""
8+
since = 2020
9+
customText = ""
1010

1111
[dateFormat]
12-
published = "Jan 02, 2006"
13-
lastUpdated = "Jan 02, 2006 15:04 MST"
12+
published = ":date_full"
13+
lastUpdated = ":date_full"
1414

1515
[sidebar]
16-
emoji = "🍥"
17-
subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
16+
emoji = "🍥"
17+
subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
1818

19-
[sidebar.avatar]
20-
enabled = true
21-
local = true
22-
src = "img/avatar.png"
19+
[sidebar.avatar]
20+
enabled = true
21+
local = true
22+
src = "img/avatar.png"
2323

2424
[article]
25-
headingAnchor = false
26-
math = false
27-
readingTime = true
28-
29-
[article.license]
30-
enabled = true
31-
default = "Licensed under CC BY-NC-SA 4.0"
32-
33-
## Widgets
34-
[[widgets.homepage]]
35-
type = "search"
36-
37-
[[widgets.homepage]]
38-
type = "archives"
39-
40-
[widgets.homepage.params]
41-
limit = 5
42-
43-
[[widgets.homepage]]
44-
type = "categories"
45-
46-
[widgets.homepage.params]
47-
limit = 10
48-
49-
[[widgets.homepage]]
50-
type = "tag-cloud"
51-
52-
[widgets.homepage.params]
53-
limit = 10
54-
55-
[[widgets.page]]
56-
type = "toc"
25+
headingAnchor = false
26+
math = false
27+
readingTime = true
28+
29+
[article.license]
30+
enabled = true
31+
default = "Licensed under CC BY-NC-SA 4.0"
32+
33+
[widgets]
34+
homepage = [
35+
{ type = "search" },
36+
{ type = "archives", params = { limit = 5 } },
37+
{ type = "categories", params = { limit = 10 } },
38+
{ type = "tag-cloud", params = { limit = 10 } },
39+
]
40+
page = [{ type = "toc" }]
5741

5842
[opengraph.twitter]
59-
site = ""
60-
card = "summary_large_image"
61-
62-
[defaultImage.opengraph]
63-
enabled = false
64-
local = false
65-
src = ""
43+
site = ""
44+
card = "summary_large_image"
6645

6746
[colorScheme]
68-
toggle = true
69-
default = "auto"
70-
71-
[imageProcessing.cover]
72-
enabled = true
73-
74-
[imageProcessing.content]
75-
enabled = true
47+
toggle = true
48+
default = "auto"
7649

7750
## Comments
7851
[comments]
79-
enabled = true
80-
provider = "disqus"
81-
82-
[comments.disqusjs]
83-
shortname = ""
84-
apiUrl = ""
85-
apiKey = ""
86-
admin = ""
87-
adminLabel = ""
88-
89-
[comments.utterances]
90-
repo = ""
91-
issueTerm = "pathname"
92-
label = ""
93-
94-
[comments.remark42]
95-
host = ""
96-
site = ""
97-
locale = ""
98-
99-
[comments.vssue]
100-
platform = ""
101-
owner = ""
102-
repo = ""
103-
clientId = ""
104-
clientSecret = ""
105-
autoCreateIssue = false
106-
107-
[comments.waline]
108-
serverURL = ""
109-
lang = ""
110-
visitor = ""
111-
avatar = ""
112-
emoji = ["https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo"]
113-
requiredMeta = ["name", "email", "url"]
114-
placeholder = ""
115-
116-
[comments.waline.locale]
117-
admin = "Admin"
118-
119-
[comments.twikoo]
120-
envId = ""
121-
region = ""
122-
path = ""
123-
lang = ""
124-
125-
[comments.cactus]
126-
defaultHomeserverUrl = "https://matrix.cactus.chat:8448"
127-
serverName = "cactus.chat"
128-
siteName = ""
129-
130-
[comments.giscus]
131-
repo = ""
132-
repoID = ""
133-
category = ""
134-
categoryID = ""
135-
mapping = ""
136-
lightTheme = ""
137-
darkTheme = ""
138-
reactionsEnabled = 1
139-
emitMetadata = 0
140-
141-
[comments.gitalk]
142-
owner = ""
143-
admin = ""
144-
repo = ""
145-
clientID = ""
146-
clientSecret = ""
52+
enabled = true
53+
provider = "disqus"
14754

148-
[comments.cusdis]
149-
host = ""
150-
id = ""
55+
# See all the available configurations at https://github.com/CaiJimmy/hugo-theme-stack/blob/master/config/_default/params.toml
56+
# Copy the configurations you need from there and paste it here.

config/_default/permalinks.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Permalinks format of each content section
22
post = "/p/:slug/"
3-
page = "/:slug/"
3+
page = "/:slug/"

config/_default/related.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# Related contents configuration
22
includeNewer = true
3-
threshold = 60
4-
toLower = false
3+
threshold = 60
4+
toLower = false
55

6-
[[indices]]
7-
name = "tags"
8-
weight = 100
9-
10-
[[indices]]
11-
name = "categories"
12-
weight = 200
6+
indices = [
7+
{ name = "tags", weight = 100 },
8+
{ name = "categories", weight = 200 },
9+
]

0 commit comments

Comments
 (0)