Please enable Javascript to view the contents

Hugo Zzo 主题配置

 ·  ☕ 2 分钟  ·  🤖 wisely

配置

1. 修改作者信息

位置:\config_default\params.toml

1
2
3
4
5
6
7
8
9
# whoami
myname = "wisely"
email = "wiselyjing@gmail.com"
whoami = "Developer"
bioImageUrl = ""
useGravatar = false
organization = "Hugo"
location = "Chinese"
link = "https://wiselyj.com"

2.修改左上角名称

位置:\config_default\params.toml

1
logoText = "Wisely'Blog"

3.修改网站地址和标题

位置:\config_default\config.toml

1
2
3
baseURL = "http://wiselyj.com"
#导航栏上的标题
title = "Wisely's blog"

4. 添加中文语言并配置

位置:\config_default\config.toml

1
2
#默认打开的语言
defaultContentLanguage = "zh"

位置:\config_default\languages.toml

1
2
3
4
5
6
7
[zh]
  title = "Hugo Zzo Theme"
  languageName = "Chinese"
  weight = 1
  contentdir = "content/zh"
  [zhparams]
    languagedir = "ltr"	

添加文件menus.zh.toml
位置:\config_default\

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[[main]]
  identifier = "about"
  name = "关于"
  url = "about"
  weight = 1

[[main]]
  identifier = "posts"
  name = "文章"
  url = "posts"
  weight = 2

[[main]]
  identifier = "publication"
  name = "阅读"
  url = "publication"
  weight = 3
  
[[main]]
  identifier = "archive"
  name = "时间轴"
  url = "archive"
  weight = 4

位置:\static
添加下面的文件

image alt

如果不添加,则会使用主题下面的图标
位置:\themes\zzo\static

6.修改网站图标

使用
https://www.favicon-generator.org/生成

位置:static\favicon

修改文件
位置:\config_default\params.toml

1
2
useFaviconGenerator = true 
# https://www.favicon-generator.org/

7.修改Blog介绍

对应语言的位置
\content\zh_index.md

1
2
3
4
    title:
      - Wisely's Store
    subtitle:
      - A technical grocery store, open 24 hours a day, welcome to visit us

参考文章

Zzo 官方
Hugo使用Tips
WordPress 快速迁移 Hugo 教程

分享

wisely
作者
wisely
Developer