修改其他人的hugo文件一般只需要做两步,把自己的md文件丢到content的posts里面,以及修改config.toml文件。
修改图标可以更改favicon.ico文件。
如果要精细的自定义,可以在vscode中搜索theme文件夹中的关键词来进行修改。
豆瓣代码:
我的config.toml如下
baseURL = "https://www.prompt4all.tech/"
languageCode = "zh-CN"
# DefaultContentLanguage = "zh-CN"
title = "可乐不加冰"
subtitle = "科学允许分歧"
timeZone = 'Asia/Shanghai'
theme = "hello-friend"
summaryLength = 140
hasCJKLanguage = true
# 每页显示的文章数量用于分页
paginate = 10
# rss 输出数量
rssLimit = 5
ignoreErrors = ["error-remote-getjson","error-remote-getcsv"]
[permalinks] # URL模式配置
posts = "/:filename/" # 这里的:filename表示使用文件名作为URL的一部分,例如post/hello-world.md会生成/hello-world/这样的URL
tags = "/tags/:slug/" # 这里的:slug表示使用标签名作为URL的一部分,例如tags/hugo.md会生成/tags/hugo/这样的URL
[menu]
[[menu.main]]
name="文献笔记"
url="/posts/文献笔记/"
weight="1"
[[menu.main]]
name="表征处理"
url="/posts/表征处理/"
weight="2"
[[menu.main]]
name="软件代码"
url="/posts/软件代码/"
weight="3"
[[menu.main]]
name="材料合成"
url="/posts/材料合成/"
weight="4"
[[menu.main]]
name="归档"
url="/archives/"
weight="5"
[[menu.main]]
name="关于"
url="/about/"
weight="6"
[[menu.main]]
name="搜索"
url="/search/"
weight="7"
[params]
# dir name of your blog content (default is `content/posts`)
contentTypeName = "posts"
# "light" or "dark"
defaultTheme = "light"
# if you set this to 0, only submenu trigger will be visible
showMenuItems = 5
# Enable to show reading time in minutes for posts
showReadingTime = true
logoText = "hello friend"
MenuMore = "更多"
DateFormatList = "2006-01-02 15:04:05"
DateFormatSingle = "2006-01-02 15:04:05"
ReadMore = "阅读全文"
EditPath = 'https://github.com/lmm214/immmmm/edit/master/content'
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
[markup.tableOfContents]
endLevel = 3
ordered = false
startLevel = 1
[outputs]
home = ["Atom", "HTML","JSON"] # <domain>/atom.xml
page = ["HTML"]
[outputFormats.Atom]
mediatype = "application/rss"
baseName = "atom"
[params.twikoo]
enable = true