refactor: config
This commit is contained in:
@@ -55,23 +55,98 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 1024px) {
|
.links-section {
|
||||||
.article-list--compact.links {
|
margin-bottom: 10px;
|
||||||
display: grid;
|
}
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
background: none;
|
|
||||||
box-shadow: none;
|
|
||||||
|
|
||||||
article {
|
.links-section__header {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
border-bottom: 2px solid var(--card-separator-color);
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0;
|
||||||
|
color: var(--card-text-color-main);
|
||||||
|
font-size: 2.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.links-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-card {
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 132px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: var(--card-border-radius);
|
||||||
background: var(--card-background);
|
background: var(--card-background);
|
||||||
border: none;
|
box-shadow: var(--shadow-l1);
|
||||||
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
box-shadow: var(--shadow-l2);
|
box-shadow: var(--shadow-l2);
|
||||||
margin-bottom: 8px;
|
|
||||||
border-radius: 10px;
|
|
||||||
&:nth-child(odd) {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> a {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
min-height: 132px;
|
||||||
|
padding: 24px 28px;
|
||||||
|
gap: 24px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-card__details {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-card__title {
|
||||||
|
margin: 0 0 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
color: var(--card-text-color-main);
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: 700;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-card__description {
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
color: var(--card-text-color-secondary);
|
||||||
|
font-size: 1.5rem;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-card__image {
|
||||||
|
flex: 0 0 72px;
|
||||||
|
width: 72px;
|
||||||
|
height: 72px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 12px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.links-grid {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1280px) {
|
||||||
|
.links-grid {
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
17
config/_default/hugo.toml
Normal file
17
config/_default/hugo.toml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
baseURL = "https://www.taurusxin.com"
|
||||||
|
locale = "zh"
|
||||||
|
defaultContentLanguage = "zh"
|
||||||
|
hasCJKLanguage = true
|
||||||
|
theme = "hugo-theme-stack"
|
||||||
|
title = "TaurusXin 的独立博客"
|
||||||
|
timeout = "60s"
|
||||||
|
|
||||||
|
[services.disqus]
|
||||||
|
shortname = "taurusxin"
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 10
|
||||||
|
|
||||||
|
[permalinks]
|
||||||
|
post = "/:slug/"
|
||||||
|
page = "/:slug/"
|
||||||
16
config/_default/markup.toml
Normal file
16
config/_default/markup.toml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[goldmark.renderer]
|
||||||
|
unsafe = true
|
||||||
|
|
||||||
|
[tableOfContents]
|
||||||
|
endLevel = 4
|
||||||
|
ordered = true
|
||||||
|
startLevel = 2
|
||||||
|
|
||||||
|
[highlight]
|
||||||
|
noClasses = false
|
||||||
|
codeFences = true
|
||||||
|
guessSyntax = true
|
||||||
|
lineNoStart = 1
|
||||||
|
lineNos = true
|
||||||
|
lineNumbersInTable = true
|
||||||
|
tabWidth = 4
|
||||||
74
config/_default/menu.toml
Normal file
74
config/_default/menu.toml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
[[main]]
|
||||||
|
identifier = "home"
|
||||||
|
name = "首页"
|
||||||
|
url = "/"
|
||||||
|
weight = 1
|
||||||
|
[main.params]
|
||||||
|
icon = "home"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
identifier = "moments"
|
||||||
|
name = "拾光"
|
||||||
|
url = "https://moments.taurusxin.com"
|
||||||
|
weight = 5
|
||||||
|
[main.params]
|
||||||
|
icon = "moments"
|
||||||
|
newTab = true
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
identifier = "travellings"
|
||||||
|
name = "开往"
|
||||||
|
url = "https://www.travellings.cn/go.html"
|
||||||
|
weight = 6
|
||||||
|
[main.params]
|
||||||
|
icon = "travellings"
|
||||||
|
newTab = true
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
identifier = "rss"
|
||||||
|
name = "RSS"
|
||||||
|
url = "/index.xml"
|
||||||
|
weight = 10
|
||||||
|
[main.params]
|
||||||
|
icon = "rss"
|
||||||
|
newTab = true
|
||||||
|
|
||||||
|
[[social]]
|
||||||
|
identifier = "github"
|
||||||
|
name = "GitHub"
|
||||||
|
url = "https://github.com/taurusxin"
|
||||||
|
weight = 1
|
||||||
|
[social.params]
|
||||||
|
icon = "brand-github"
|
||||||
|
|
||||||
|
[[social]]
|
||||||
|
identifier = "bilibili"
|
||||||
|
name = "Bilibili"
|
||||||
|
url = "https://space.bilibili.com/4360325"
|
||||||
|
weight = 2
|
||||||
|
[social.params]
|
||||||
|
icon = "bilibili"
|
||||||
|
|
||||||
|
[[social]]
|
||||||
|
identifier = "music"
|
||||||
|
name = "网易云音乐"
|
||||||
|
url = "https://music.163.com/#/user/home?id=260531598"
|
||||||
|
weight = 3
|
||||||
|
[social.params]
|
||||||
|
icon = "music"
|
||||||
|
|
||||||
|
[[social]]
|
||||||
|
identifier = "mail"
|
||||||
|
name = "电邮"
|
||||||
|
url = "mailto:i@taurusxin.com"
|
||||||
|
weight = 4
|
||||||
|
[social.params]
|
||||||
|
icon = "mail"
|
||||||
|
|
||||||
|
[[social]]
|
||||||
|
identifier = "travellings"
|
||||||
|
name = "开往"
|
||||||
|
url = "https://www.travellings.cn/go.html"
|
||||||
|
weight = 5
|
||||||
|
[social.params]
|
||||||
|
icon = "travellings"
|
||||||
100
config/_default/params.toml
Normal file
100
config/_default/params.toml
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
mainSections = ["post"]
|
||||||
|
featuredImageField = "image"
|
||||||
|
rssFullContent = true
|
||||||
|
favicon = ""
|
||||||
|
SortBy = "default"
|
||||||
|
|
||||||
|
[footer]
|
||||||
|
since = 2018
|
||||||
|
customText = "Made with ❤️ in Hangzhou <br> <a href=\"https://beian.miit.gov.cn/\" target=\"_blank\">浙ICP备2022025362号-1</a>"
|
||||||
|
|
||||||
|
[dateFormat]
|
||||||
|
published = ":date_full"
|
||||||
|
lastUpdated = ":date_full"
|
||||||
|
|
||||||
|
[sidebar]
|
||||||
|
emoji = "🍉"
|
||||||
|
subtitle = "永远年轻 永远热泪盈眶"
|
||||||
|
compact = false
|
||||||
|
avatar = "img/avatar.png"
|
||||||
|
|
||||||
|
[article]
|
||||||
|
headingAnchor = false
|
||||||
|
math = false
|
||||||
|
toc = true
|
||||||
|
readingTime = true
|
||||||
|
|
||||||
|
[article.list]
|
||||||
|
showTags = false
|
||||||
|
|
||||||
|
[article.license]
|
||||||
|
enabled = true
|
||||||
|
default = "Licensed under CC BY-NC-SA 4.0"
|
||||||
|
|
||||||
|
[article.mermaid]
|
||||||
|
look = "classic"
|
||||||
|
lightTheme = "default"
|
||||||
|
darkTheme = "dark"
|
||||||
|
securityLevel = "strict"
|
||||||
|
htmlLabels = true
|
||||||
|
transparentBackground = false
|
||||||
|
|
||||||
|
[article.alertIcon]
|
||||||
|
note = ""
|
||||||
|
tip = ""
|
||||||
|
important = ""
|
||||||
|
warning = "⚠️"
|
||||||
|
caution = ""
|
||||||
|
|
||||||
|
[comments]
|
||||||
|
enabled = true
|
||||||
|
provider = "artalk"
|
||||||
|
|
||||||
|
[comments.artalk]
|
||||||
|
serverUrl = "https://artalk.taurusxin.com"
|
||||||
|
site = "TaurusXin 的独立博客"
|
||||||
|
darkMode = "auto"
|
||||||
|
|
||||||
|
[widgets]
|
||||||
|
homepage = [
|
||||||
|
{ type = "search" },
|
||||||
|
{ type = "archives", params = { limit = 5 } },
|
||||||
|
{ type = "categories", params = { limit = 10 } },
|
||||||
|
{ type = "tag-cloud", params = { limit = 10 } },
|
||||||
|
{ type = "status", params = { start = "2018-08-04", format = "yyyy 年 MM 月 dd 日" } },
|
||||||
|
]
|
||||||
|
page = [
|
||||||
|
{ type = "toc" },
|
||||||
|
]
|
||||||
|
|
||||||
|
[opengraph.twitter]
|
||||||
|
site = ""
|
||||||
|
card = "summary_large_image"
|
||||||
|
|
||||||
|
[colorScheme]
|
||||||
|
toggle = true
|
||||||
|
default = "auto"
|
||||||
|
|
||||||
|
[imageProcessing]
|
||||||
|
autoOrient = false
|
||||||
|
|
||||||
|
[imageProcessing.external]
|
||||||
|
timeout = "30s"
|
||||||
|
|
||||||
|
[imageProcessing.thumbnail]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[imageProcessing.content]
|
||||||
|
widths = [800, 1600, 2400]
|
||||||
|
enabled = false
|
||||||
|
|
||||||
|
[cookies]
|
||||||
|
enabled = false
|
||||||
|
showSettings = true
|
||||||
|
|
||||||
|
[cookies.categories]
|
||||||
|
analytics = false
|
||||||
|
functional = true
|
||||||
|
|
||||||
|
[render.image.externalLink]
|
||||||
|
enabled = true
|
||||||
11
config/_default/related.toml
Normal file
11
config/_default/related.toml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
includeNewer = true
|
||||||
|
threshold = 60
|
||||||
|
toLower = false
|
||||||
|
|
||||||
|
[[indices]]
|
||||||
|
name = "tags"
|
||||||
|
weight = 100
|
||||||
|
|
||||||
|
[[indices]]
|
||||||
|
name = "categories"
|
||||||
|
weight = 200
|
||||||
@@ -16,4 +16,4 @@ Lightbox = "https://cdn.jsdelivr.net/npm/photoswipe@5.4.4/dist/photoswipe-lightb
|
|||||||
|
|
||||||
[Artalk]
|
[Artalk]
|
||||||
Style = "https://cdn.taurusxin.com/hugo/assets/artalk/2.9.1/Artalk.min.css"
|
Style = "https://cdn.taurusxin.com/hugo/assets/artalk/2.9.1/Artalk.min.css"
|
||||||
Script = "https://cdn.taurusxin.com/hugo/assets/artalk/2.9.1/Artalk.min.js"
|
Script = "https://cdn.taurusxin.com/hugo/assets/artalk/2.9.1/Artalk.mjs"
|
||||||
|
|||||||
318
hugo.toml
318
hugo.toml
@@ -1,318 +0,0 @@
|
|||||||
baseURL = "https://www.taurusxin.com"
|
|
||||||
locale = "zh"
|
|
||||||
defaultContentLanguage = "zh"
|
|
||||||
hasCJKLanguage = true
|
|
||||||
theme = "hugo-theme-stack"
|
|
||||||
title = "TaurusXin 的独立博客"
|
|
||||||
timeout = "60s"
|
|
||||||
|
|
||||||
[services.disqus]
|
|
||||||
shortname = "taurusxin"
|
|
||||||
|
|
||||||
[pagination]
|
|
||||||
pagerSize = 10
|
|
||||||
|
|
||||||
[permalinks]
|
|
||||||
post = "/:slug/"
|
|
||||||
page = "/:slug/"
|
|
||||||
|
|
||||||
[params]
|
|
||||||
mainSections = ["post"]
|
|
||||||
featuredImageField = "image"
|
|
||||||
rssFullContent = true
|
|
||||||
favicon = ""
|
|
||||||
SortBy = "default"
|
|
||||||
|
|
||||||
[params.footer]
|
|
||||||
since = 2018
|
|
||||||
customText = "Made with ❤️ in Hangzhou <br> <a href=\"https://beian.miit.gov.cn/\" target=\"_blank\">浙ICP备2022025362号-1</a>"
|
|
||||||
|
|
||||||
[params.dateFormat]
|
|
||||||
published = ":date_full"
|
|
||||||
lastUpdated = ":date_full"
|
|
||||||
|
|
||||||
[params.sidebar]
|
|
||||||
emoji = "🍉"
|
|
||||||
subtitle = "永远年轻 永远热泪盈眶"
|
|
||||||
compact = false
|
|
||||||
avatar = "img/avatar.png"
|
|
||||||
|
|
||||||
[params.article]
|
|
||||||
headingAnchor = false
|
|
||||||
math = false
|
|
||||||
toc = true
|
|
||||||
readingTime = true
|
|
||||||
|
|
||||||
[params.article.list]
|
|
||||||
showTags = false
|
|
||||||
|
|
||||||
[params.article.license]
|
|
||||||
enabled = true
|
|
||||||
default = "Licensed under CC BY-NC-SA 4.0"
|
|
||||||
|
|
||||||
[params.article.mermaid]
|
|
||||||
look = "classic"
|
|
||||||
lightTheme = "default"
|
|
||||||
darkTheme = "dark"
|
|
||||||
securityLevel = "strict"
|
|
||||||
htmlLabels = true
|
|
||||||
transparentBackground = false
|
|
||||||
|
|
||||||
[params.article.alertIcon]
|
|
||||||
note = ""
|
|
||||||
tip = ""
|
|
||||||
important = ""
|
|
||||||
warning = "⚠️"
|
|
||||||
caution = ""
|
|
||||||
|
|
||||||
[params.comments]
|
|
||||||
enabled = true
|
|
||||||
provider = "artalk"
|
|
||||||
|
|
||||||
[params.comments.artalk]
|
|
||||||
serverUrl = "https://artalk.taurusxin.com"
|
|
||||||
site = "TaurusXin 的独立博客"
|
|
||||||
darkMode = "auto"
|
|
||||||
|
|
||||||
[params.comments.disqusjs]
|
|
||||||
shortname = "taurusxin"
|
|
||||||
apiUrl = ""
|
|
||||||
apiKey = ""
|
|
||||||
admin = ""
|
|
||||||
adminLabel = ""
|
|
||||||
|
|
||||||
[params.comments.utterances]
|
|
||||||
repo = ""
|
|
||||||
issueTerm = "pathname"
|
|
||||||
label = ""
|
|
||||||
|
|
||||||
[params.comments.beaudar]
|
|
||||||
repo = ""
|
|
||||||
issueTerm = "pathname"
|
|
||||||
label = ""
|
|
||||||
theme = ""
|
|
||||||
|
|
||||||
[params.comments.remark42]
|
|
||||||
host = ""
|
|
||||||
site = ""
|
|
||||||
locale = "en"
|
|
||||||
max_shown_comments = 15
|
|
||||||
show_email_subscription = true
|
|
||||||
|
|
||||||
[params.comments.vssue]
|
|
||||||
platform = ""
|
|
||||||
owner = ""
|
|
||||||
repo = ""
|
|
||||||
clientId = ""
|
|
||||||
clientSecret = ""
|
|
||||||
autoCreateIssue = false
|
|
||||||
|
|
||||||
[params.comments.waline]
|
|
||||||
serverURL = ""
|
|
||||||
lang = ""
|
|
||||||
pageview = ""
|
|
||||||
avatar = ""
|
|
||||||
emoji = ["https://unpkg.com/@waline/emojis@1.0.1/weibo"]
|
|
||||||
requiredMeta = ["name", "email", "url"]
|
|
||||||
|
|
||||||
[params.comments.waline.locale]
|
|
||||||
admin = "Admin"
|
|
||||||
placeholder = ""
|
|
||||||
|
|
||||||
[params.comments.twikoo]
|
|
||||||
envId = ""
|
|
||||||
region = ""
|
|
||||||
path = ""
|
|
||||||
lang = ""
|
|
||||||
|
|
||||||
[params.comments.cactus]
|
|
||||||
defaultHomeserverUrl = "https://matrix.cactus.chat:8448"
|
|
||||||
serverName = "cactus.chat"
|
|
||||||
siteName = ""
|
|
||||||
|
|
||||||
[params.comments.giscus]
|
|
||||||
repo = ""
|
|
||||||
repoID = ""
|
|
||||||
category = ""
|
|
||||||
categoryID = ""
|
|
||||||
mapping = "title"
|
|
||||||
lightTheme = "light"
|
|
||||||
darkTheme = "dark_dimmed"
|
|
||||||
reactionsEnabled = 1
|
|
||||||
emitMetadata = 0
|
|
||||||
inputPosition = "top"
|
|
||||||
lang = "en"
|
|
||||||
strict = 0
|
|
||||||
loading = "lazy"
|
|
||||||
|
|
||||||
[params.comments.gitalk]
|
|
||||||
owner = ""
|
|
||||||
admin = ""
|
|
||||||
repo = ""
|
|
||||||
clientID = ""
|
|
||||||
clientSecret = ""
|
|
||||||
proxy = ""
|
|
||||||
|
|
||||||
[params.comments.cusdis]
|
|
||||||
host = "https://cusdis.com"
|
|
||||||
id = ""
|
|
||||||
|
|
||||||
[params.comments.comentario]
|
|
||||||
url = ""
|
|
||||||
autoInit = false
|
|
||||||
autoNonInteractiveSso = false
|
|
||||||
cssOverride = ""
|
|
||||||
lang = ""
|
|
||||||
liveUpdate = false
|
|
||||||
maxLevel = 0
|
|
||||||
noFonts = false
|
|
||||||
theme = ""
|
|
||||||
|
|
||||||
[params.widgets]
|
|
||||||
homepage = [
|
|
||||||
{ type = "search" },
|
|
||||||
{ type = "archives", params = { limit = 5 } },
|
|
||||||
{ type = "categories", params = { limit = 10 } },
|
|
||||||
{ type = "tag-cloud", params = { limit = 10 } },
|
|
||||||
{ type = "status", params = { start = "2018-08-04", format = "yyyy 年 MM 月 dd 日" } },
|
|
||||||
]
|
|
||||||
page = [
|
|
||||||
{ type = "toc" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[params.opengraph.twitter]
|
|
||||||
site = ""
|
|
||||||
card = "summary_large_image"
|
|
||||||
|
|
||||||
[params.colorScheme]
|
|
||||||
toggle = true
|
|
||||||
default = "auto"
|
|
||||||
|
|
||||||
[params.imageProcessing]
|
|
||||||
autoOrient = false
|
|
||||||
|
|
||||||
[params.imageProcessing.external]
|
|
||||||
timeout = "30s"
|
|
||||||
|
|
||||||
[params.imageProcessing.thumbnail]
|
|
||||||
enabled = true
|
|
||||||
|
|
||||||
[params.imageProcessing.content]
|
|
||||||
widths = [800, 1600, 2400]
|
|
||||||
enabled = false
|
|
||||||
|
|
||||||
[params.cookies]
|
|
||||||
enabled = false
|
|
||||||
showSettings = true
|
|
||||||
|
|
||||||
[params.cookies.categories]
|
|
||||||
analytics = false
|
|
||||||
functional = true
|
|
||||||
|
|
||||||
[params.render.image.externalLink]
|
|
||||||
enabled = true
|
|
||||||
|
|
||||||
[[menu.main]]
|
|
||||||
identifier = "home"
|
|
||||||
name = "首页"
|
|
||||||
url = "/"
|
|
||||||
weight = 1
|
|
||||||
[menu.main.params]
|
|
||||||
icon = "home"
|
|
||||||
|
|
||||||
[[menu.main]]
|
|
||||||
identifier = "moments"
|
|
||||||
name = "拾光"
|
|
||||||
url = "https://moments.taurusxin.com"
|
|
||||||
weight = 5
|
|
||||||
[menu.main.params]
|
|
||||||
icon = "moments"
|
|
||||||
newTab = true
|
|
||||||
|
|
||||||
[[menu.main]]
|
|
||||||
identifier = "travellings"
|
|
||||||
name = "开往"
|
|
||||||
url = "https://www.travellings.cn/go.html"
|
|
||||||
weight = 6
|
|
||||||
[menu.main.params]
|
|
||||||
icon = "travellings"
|
|
||||||
newTab = true
|
|
||||||
|
|
||||||
[[menu.main]]
|
|
||||||
identifier = "rss"
|
|
||||||
name = "RSS"
|
|
||||||
url = "/index.xml"
|
|
||||||
weight = 10
|
|
||||||
[menu.main.params]
|
|
||||||
icon = "rss"
|
|
||||||
newTab = true
|
|
||||||
|
|
||||||
[[menu.social]]
|
|
||||||
identifier = "github"
|
|
||||||
name = "GitHub"
|
|
||||||
url = "https://github.com/taurusxin"
|
|
||||||
weight = 1
|
|
||||||
[menu.social.params]
|
|
||||||
icon = "brand-github"
|
|
||||||
|
|
||||||
[[menu.social]]
|
|
||||||
identifier = "bilibili"
|
|
||||||
name = "Bilibili"
|
|
||||||
url = "https://space.bilibili.com/4360325"
|
|
||||||
weight = 2
|
|
||||||
[menu.social.params]
|
|
||||||
icon = "bilibili"
|
|
||||||
|
|
||||||
[[menu.social]]
|
|
||||||
identifier = "music"
|
|
||||||
name = "网易云音乐"
|
|
||||||
url = "https://music.163.com/#/user/home?id=260531598"
|
|
||||||
weight = 3
|
|
||||||
[menu.social.params]
|
|
||||||
icon = "music"
|
|
||||||
|
|
||||||
[[menu.social]]
|
|
||||||
identifier = "mail"
|
|
||||||
name = "电邮"
|
|
||||||
url = "mailto:i@taurusxin.com"
|
|
||||||
weight = 4
|
|
||||||
[menu.social.params]
|
|
||||||
icon = "mail"
|
|
||||||
|
|
||||||
[[menu.social]]
|
|
||||||
identifier = "travellings"
|
|
||||||
name = "开往"
|
|
||||||
url = "https://www.travellings.cn/go.html"
|
|
||||||
weight = 5
|
|
||||||
[menu.social.params]
|
|
||||||
icon = "travellings"
|
|
||||||
|
|
||||||
[related]
|
|
||||||
includeNewer = true
|
|
||||||
threshold = 60
|
|
||||||
toLower = false
|
|
||||||
|
|
||||||
[[related.indices]]
|
|
||||||
name = "tags"
|
|
||||||
weight = 100
|
|
||||||
|
|
||||||
[[related.indices]]
|
|
||||||
name = "categories"
|
|
||||||
weight = 200
|
|
||||||
|
|
||||||
[markup.goldmark.renderer]
|
|
||||||
unsafe = true
|
|
||||||
|
|
||||||
[markup.tableOfContents]
|
|
||||||
endLevel = 4
|
|
||||||
ordered = true
|
|
||||||
startLevel = 2
|
|
||||||
|
|
||||||
[markup.highlight]
|
|
||||||
noClasses = false
|
|
||||||
codeFences = true
|
|
||||||
guessSyntax = true
|
|
||||||
lineNoStart = 1
|
|
||||||
lineNos = true
|
|
||||||
lineNumbersInTable = true
|
|
||||||
tabWidth = 4
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
{{- $style := resources.Get "scss/partials/comments/artalk.scss" | toCSS | minify -}}
|
|
||||||
{{- with .Site.Params.comments.artalk -}}
|
|
||||||
{{- $serverUrl := default .server .serverUrl -}}
|
|
||||||
<link href="https://cdn.taurusxin.com/hugo/assets/artalk/2.9.1/Artalk.min.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
|
||||||
|
|
||||||
<script src="https://cdn.taurusxin.com/hugo/assets/artalk/2.9.1/Artalk.min.js"></script>
|
|
||||||
|
|
||||||
<div id="Comments" class="artalk-container"></div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function isDarkMode() {
|
|
||||||
return document.documentElement.dataset.scheme === 'dark';
|
|
||||||
}
|
|
||||||
|
|
||||||
const artalkInstance = Artalk.init({
|
|
||||||
el: '#Comments',
|
|
||||||
pageKey: '{{ $.RelPermalink }}',
|
|
||||||
pageTitle: '{{ $.Title }}',
|
|
||||||
server: '{{ $serverUrl }}',
|
|
||||||
site: '{{ .site }}',
|
|
||||||
darkMode: isDarkMode(),
|
|
||||||
locale: 'auto',
|
|
||||||
});
|
|
||||||
|
|
||||||
window.addEventListener('onColorSchemeChange', (e) => {
|
|
||||||
if (!artalkInstance || typeof artalkInstance.setDarkMode !== 'function') return;
|
|
||||||
artalkInstance.setDarkMode(e.detail === 'dark');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{{- end -}}
|
|
||||||
Reference in New Issue
Block a user