-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to hugo mod and configDir
It is a recommended way and can also use different configurations in the development and production environments. ref: https://gohugo.io/getting-started/configuration/#configuration-directory The theme is avaliable as a hugo mod, and some minor changes don't need to include it, just use hugo's lookup order to override style and config. ref: https://gohugo.io/templates/lookup-order/ Signed-off-by: cubercsl <[email protected]> Co-authored-by: chinggg <[email protected]> Co-authored-by: 狗蛋日 <[email protected]> Co-authored-by: J. Xing <[email protected]>
- Loading branch information
1 parent
9192e7e
commit f59bb36
Showing
2,719 changed files
with
196 additions
and
48,719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ hugo.linux | |
|
||
# Temporary lock file while building | ||
/.hugo_build.lock | ||
|
||
# hugo mod vender | ||
/_vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
// ============================== | ||
// Custom style | ||
// 自定义样式 | ||
// ============================== | ||
|
||
|
||
hr { | ||
border-top: 1px dashed #0C3168 !important; | ||
[data-theme='dark'] & { | ||
border-top: 1px dashed #f8f8ff !important; | ||
|
||
} | ||
|
||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
title = 'SHUFly - 上海大学溯源手册' | ||
# canonifyURLs = true # Fix GitHub Pages wrong path | ||
|
||
# [en, zh-cn, fr, ...] 设置默认的语言 | ||
defaultContentLanguage = "zh-cn" | ||
# 网站语言,仅在这里 CN 大写 | ||
languageCode = "zh-CN" | ||
# 是否包括中日韩文字 | ||
hasCJKLanguage = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 设置自动更新修改时间 | ||
date = [':git', 'lastmod', ':default'] | ||
lastmod = [':fileModTime', ':git', 'lastmod', ':default'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Hugo 解析文档的配置 | ||
# 语法高亮设置 (https://gohugo.io/content-management/syntax-highlighting) | ||
[highlight] | ||
codeFences = true | ||
guessSyntax = true | ||
lineNos = true | ||
lineNumbersInTable = true | ||
# false 是必要的设置 | ||
# (https://github.com/dillonzq/LoveIt/issues/158) | ||
noClasses = false | ||
# Goldmark 是 Hugo 0.60 以来的默认 Markdown 解析库 | ||
[goldmark] | ||
[goldmark.extensions] | ||
definitionList = true | ||
footnote = true | ||
linkify = true | ||
strikethrough = true | ||
table = true | ||
taskList = true | ||
typographer = true | ||
[goldmark.renderer] | ||
# 是否在文档中直接使用 HTML 标签 | ||
unsafe = true | ||
# 目录设置 | ||
[tableOfContents] | ||
startLevel = 2 | ||
endLevel = 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# 中文菜单配置 | ||
[[main]] | ||
identifier = "posts" | ||
# 父级菜单项的标识符 (identifier) since v0.2.14 | ||
parent = "" | ||
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标 | ||
pre = "<i class='fa-solid fa-archive fa-fw fa-sm'></i>" | ||
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标 | ||
post = "" | ||
name = "所有文章" | ||
url = "/posts/" | ||
title = "" | ||
weight = 1 | ||
[[main]] | ||
identifier = "categories" | ||
pre = "<i class='fa-solid fa-th fa-fw fa-sm'></i>" | ||
post = "" | ||
name = "分类" | ||
url = "/categories/" | ||
title = "" | ||
weight = 2 | ||
[[main]] | ||
identifier = "tags" | ||
pre = "<i class='fa-solid fa-tags fa-fw fa-sm'></i>" | ||
post = "" | ||
name = "标签" | ||
url = "/tags/" | ||
title = "" | ||
weight = 3 | ||
[[main]] | ||
identifier = "friends" | ||
pre = "<i class='fa-solid fa-users fa-fw fa-sm'></i>" | ||
post = "" | ||
name = "友链" | ||
url = "/friends/" | ||
title = "友情链接" | ||
weight = 4 | ||
[[main]] | ||
identifier = "about" | ||
pre = "<i class='fa-solid fa-info-circle fa-fw fa-sm'></i>" | ||
post = "" | ||
name = "关于" | ||
url = "/about/" | ||
title = "" | ||
weight = 5 | ||
[[main]] | ||
identifier = "github" | ||
pre = "<i class='fa-brands fa-github fa-fw'></i>" | ||
post = "" | ||
name = "" | ||
url = "https://github.com/shuosc/fly" | ||
title = "GitHub" | ||
weight = 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[[imports]] | ||
path = "github.com/hugo-fixit/FixIt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# FixIt 主题版本 | ||
version = "0.2.X" | ||
# Header config | ||
[header] | ||
# FixIt 0.2.13 | CHANGED desktop header mode ("sticky", "normal", "auto") | ||
desktopMode = "sticky" | ||
# FixIt 0.2.13 | CHANGED mobile header mode ("sticky", "normal", "auto") | ||
mobileMode = "auto" | ||
# FixIt 0.2.0 | NEW Header title config | ||
[header.title] | ||
# URL of the LOGO | ||
logo = "/shugug.webp" | ||
# title name | ||
name = "SHUFly" | ||
|
||
# 中文主页信息设置 | ||
[home] | ||
# RSS 文章数目 | ||
rss = 10 | ||
# 主页个人信息 | ||
[home.profile] | ||
enable = true | ||
# Gravatar 邮箱,用于优先在主页显示的头像 | ||
gravatarEmail = "" | ||
# 主页显示头像的 URL | ||
avatarURL = "/shufly.webp" | ||
# 主页显示的网站标题 (支持 HTML 格式) | ||
title = "上海大学溯源手册" | ||
# 是否为副标题显示打字机动画 | ||
typeit = true | ||
# 是否显示社交账号 | ||
social = false | ||
# 免责声明 (支持 HTML 格式) | ||
disclaimer = "" | ||
# 主页文章列表 | ||
[home.posts] | ||
enable = true | ||
# 主页每页显示文章数量 | ||
paginate = 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 生产环境时需要进行修改的配置 | ||
baseURL = 'https://shuosc.github.io/fly' | ||
canonifyURLs = true # Fix GitHub Pages wrong path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 生产环境时开启页面的评论 | ||
[page.comment] | ||
enable = true | ||
# FixIt 0.2.16 | CHANGED Waline comment config (https://waline.js.org) | ||
[page.comment.waline] | ||
enable = true | ||
serverURL = "https://shuosc-comments.xyz/" | ||
pageview = false # FixIt 0.2.15 | NEW | ||
emoji = [ | ||
"https://unpkg.com/@waline/[email protected]/bmoji", | ||
"https://unpkg.com/@waline/[email protected]/qq", | ||
"https://unpkg.com/@waline/[email protected]/alus", | ||
"//unpkg.com/@waline/[email protected]/weibo", | ||
] | ||
# meta = ["nick", "mail", "link"] | ||
requiredMeta = ["mail"] | ||
# login = "enable" | ||
wordLimit = 1000 | ||
# pageSize = 10 | ||
# imageUploader = false # FixIt 0.2.15 | NEW | ||
highlighter = true # FixIt 0.2.15 | NEW | ||
comment = false # FixIt 0.2.15 | NEW | ||
texRenderer = true # FixIt 0.2.16 | NEW | ||
search = false # FixIt 0.2.16 | NEW | ||
# recaptchaV3Key = "" # FixIt 0.2.16 | NEW | ||
|
||
# FixIt 0.2.12 | NEW Busuanzi count | ||
[ibruce] | ||
enable = true | ||
enablePost = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/shuosc/fly | ||
|
||
go 1.19 | ||
|
||
require github.com/hugo-fixit/FixIt v0.2.16 // indirect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/hugo-fixit/FixIt v0.2.16 h1:f6uCrlFwtPtkhfB8L7AbRPdMMpr/MVXvEy70qTGNzSo= | ||
github.com/hugo-fixit/FixIt v0.2.16/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU= |
Oops, something went wrong.