File tree 18 files changed +68
-200
lines changed
18 files changed +68
-200
lines changed Original file line number Diff line number Diff line change 5
5
基于 [ LoveIt] ( https://github.com/dillonzq/LoveIt ) Hugo 主题模版进行开发
6
6
7
7
初始化设置步骤如下:
8
-
9
- - [x] 安装主题后,需要在 Halo 的管理后台(Console 端)设置,在「菜单」—「主菜单」中,依次设置四个菜单项:
10
- - 【菜单1】** 名称** :所有文章;** 类型** :自定义链接;** 链接地址** :/archives;其他为默认
11
- - 【菜单2】** 名称** :标签;** 类型** :自定义链接;** 链接地址** :/tags;其他为默认
12
- - 【菜单3】** 名称** :分类;** 类型** :自定义链接;** 链接地址** :/categories;其他为默认
13
- - 【菜单4】** 类型** :自定义页面;** 自定义页面** :选择「关于」页面;其他为默认
14
-
15
- 上述设置完成后,提交并保存,并且重载主题配置刷新。
16
-
17
-
18
8
- [x] 如果需要展示博客内容,需要在 Console 端添加 ** 文章 / 标签 / 分类** ,然后将文章在设置里划分到对应的标签和分类中
9
+ - [x] 该主题需要配合 Halo 官方的评论组件、搜索组件的插件使用
19
10
20
11
注:如果主题的部分样式丢失,可在 Console 端的主题 tag 菜单底部点击保存并再次刷新主题页面查看效果
21
12
Original file line number Diff line number Diff line change 89
89
name : svg
90
90
label : 自定义 svg 图标(无对应 icon 时可选)
91
91
value :
92
- - group : system
93
- label : 主题参数
94
- formSchema :
95
- - $formkit : attachment
96
- name : svgFavicon
97
- label : 站点图标
98
- help : " 支持 png、ico、svg 格式"
99
- accepts :
100
- - " image/png"
101
- - " image/ico"
102
- - " image/svg"
103
- value : /themes/theme-clear/assets/img/avatar.png
104
92
- group : bottombar
105
93
label : 底部
106
94
formSchema :
@@ -116,59 +104,3 @@ spec:
116
104
name : icp
117
105
label : icp 备案号
118
106
value : 123456
119
- - group : about
120
- label : 关于
121
- formSchema :
122
- - $formkit : repeater
123
- name : top_desc
124
- id : top_desc
125
- key : top_desc
126
- label : 顶部描述
127
- value :
128
- - desc : 这是一段描述1
129
- - desc : 这是一段描述2
130
- children :
131
- - $formkit : text
132
- name : desc
133
- label : 顶部描述内容
134
- value :
135
- - $formkit : repeater
136
- name : content
137
- label : 内容描述
138
- value :
139
- - h2_desc : 这是一段描述1
140
- items :
141
- - desc : 描述1下子列表1
142
- - desc : 描述1下子列表2
143
- - desc : 描述1下子列表3
144
- - h2_desc : 这是一段描述2
145
- items :
146
- - desc : 描述2下子列表2
147
- - desc : 描述2下子列表2
148
- - desc : 描述2下子列表2
149
- children :
150
- - $formkit : text
151
- name : h2_desc
152
- label : h2 标题描述
153
- value :
154
- - $formkit : repeater
155
- name : items
156
- label : 描述下子列表
157
- value : [ ]
158
- children :
159
- - $formkit : text
160
- name : desc
161
- label : 列表单行描述
162
- value : " "
163
- - $formkit : text
164
- name : themeName
165
- label : 主题名称
166
- value : Clear
167
- - $formkit : attachment
168
- name : themeImg
169
- label : 主题预览图
170
- value : /themes/theme-clear/assets/img/Apple-Devices-Preview.png
171
- - $formkit : text
172
- name : imgDesc
173
- label : 主题预览图描述
174
- value : Halo 主题 Clear
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
< footer class =footer >
2
2
< div class =footer-container >
3
- < div class =footer-line >
4
- 由
5
- < a href =https://halo.run/ target =_blank rel ="noopener noreffer " title ="Halo 2.11.0 ">
6
- Halo
7
- </ a >
8
- 强力驱动 | 来源主题 -
9
- < a href =https://github.com/dillonzq/LoveIt target =_blank rel ="noopener noreffer "
10
- title ="LoveIt 0.2.11 ">
11
- < i class ="far fa-kiss-wink-heart fa-fw " aria-hidden =true >
12
- </ i >
13
- LoveIt
14
- </ a >
15
- </ div >
3
+
16
4
< div class =footer-line itemscope itemtype =http://schema.org/CreativeWork >
17
5
< i class ="far fa-copyright fa-fw " aria-hidden =true >
18
6
</ i >
34
22
< span class ="icp-splitter "> | </ span > < br class ="icp-br "/> ICP 备
35
23
< span class ="icp " th:text ="${theme.config.bottombar.icp} "> </ span > 号
36
24
</ div >
25
+ < div class =footer-line >
26
+ Powered By
27
+ < a href =https://halo.run/ target =_blank rel ="noopener noreffer " title ="Halo 2.11.0 ">
28
+ Halo
29
+ </ a >
30
+ </ div >
31
+
32
+ < footer >
33
+ < halo:footer />
34
+ </ footer >
37
35
</ div >
38
36
</ footer >
Original file line number Diff line number Diff line change 1
- < th:block th:if ="${theme.config.system.svgFavicon != ''} ">
2
- < link rel ="icon " th:href ="@{${theme.config.system.svgFavicon}} ">
3
- </ th:block >
4
- < th:block th:if ="${theme.config.system.svgFavicon == ''} ">
5
- < link rel ="shortcut icon " type ="image/x-icon " th:href ="@{/assets/img/favicon.ico} "/>
6
- < link rel ="icon " type ="image/png " sizes ="32x32 " th:href ="@{/assets/img/favicon-32x32.png} ">
7
- < link rel ="icon " type ="image/png " sizes ="16x16 " th:href ="@{/assets/img/favicon-16x16.png} ">
8
- < link rel ="apple-touch-icon " sizes ="180x180 " th:href ="@{/assets/img/apple-touch-icon.png} ">
9
- </ th:block >
10
-
11
1
< link rel =mask-icon th:href ="@{/assets/img/safari-pinned-tab.svg} " color =#5bbad5 >
12
2
< link rel =manifest th:href ="@{/assets/img/site.webmanifest} ">
13
- < link rel =canonical href =https://hugoloveit.com/zh-cn/ >
14
3
< link rel =stylesheet th:href ="@{/assets/css/style.min.css} ">
15
4
16
- < link rel =
preload href =
https://cdn.jsdelivr.net/npm/@fortawesome/[email protected] /css/all.min.css as =
style
5
+ < link rel =preload th: href =" @{/assets /css/all.min.css} " as =style
17
6
onload ='this.onload=null; this.rel="stylesheet" '>
18
7
< noscript >
19
- < link rel =
stylesheet href =
https://cdn.jsdelivr.net/npm/@fortawesome/[email protected] /css/all.min.css>
8
+ < link rel =stylesheet th: href =" @{/assets /css/all.min.css} " >
20
9
</ noscript >
21
- < link rel =preload href =https://cdn.jsdelivr.net/npm/animate. css@4.1.1 /animate.min.css as =style
10
+ < link rel =preload th: href =" @{/assets/ css/animate.min.css} " as =style
22
11
onload ='this.onload=null; this.rel="stylesheet" '>
23
12
< noscript >
24
- < link rel =stylesheet href =https://cdn.jsdelivr.net/npm/animate. css@4.1.1 /animate.min.css>
13
+ < link rel =stylesheet th: href =" @{/assets/ css/animate.min.css} " >
25
14
</ noscript >
26
15
27
16
< link rel =stylesheet th:href ="@{/assets/css/cookieconsent.min.css} ">
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
<!DOCTYPE html>
2
2
< html lang ="en " th:fragment ="html (content) " xmlns:th ="https://www.thymeleaf.org ">
3
3
< head >
4
- < meta charset ="UTF-8 " />
5
- < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
6
- < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
4
+ < meta charset ="UTF-8 "/>
5
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge "/>
6
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 "/>
7
7
< title th:text ="${site.title} "> </ title >
8
- < th:block th:replace ="~{modules/head/meta.html} " />
9
- < th:block th:replace ="~{modules/head/link.html} " />
10
- < th:block th:replace ="~{modules/head/seo.html} " />
8
+ < th:block th:replace ="~{modules/head/meta.html} "/>
9
+ < th:block th:replace ="~{modules/head/link.html} "/>
11
10
</ head >
12
11
< body data-header-desktop =fixed data-header-mobile =auto >
13
12
< script type ="text/javascript ">
42
41
< script type =text/javascript th:src ="@{/assets/js/clipboard.min.js} "> </ script >
43
42
< script type =text/javascript th:src ="@{/assets/js/sharer.min.js} "> </ script >
44
43
< script type =text/javascript th:src ="@{/assets/js/index.umd.js} "> </ script >
45
- < script defer
46
- src ="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317 "
47
- crossorigin ="anonymous ">
48
- </ script >
44
+ < script defer th:src ="@{/assets/js/beacon.min.js} " crossorigin ="anonymous "> </ script >
49
45
< script type =text/javascript th:src ="@{/assets/js/theme.min.js} "> </ script >
50
46
</ body >
51
47
</ html >
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html xmlns:th ="https://www.thymeleaf.org " xmlns:halo ="http://java.sun.com/xml/ns/javaee "
3
+ th:replace ="~{modules/layout :: html(title = ${singlePage.spec.title} + ' - ' + ${site.title}, content = ~{::content})} "
4
+ >
5
+ < th:block th:fragment ="content ">
6
+
7
+ < div class ="page single special ">
8
+ < h1 class ="single-title animate__animated animate__pulse animate__faster ">
9
+ < th:block th:text ="${singlePage.spec.title} "> </ th:block >
10
+ </ h1 >
11
+ < div class =content id =content >
12
+ < figure th:if ="${not #strings.isEmpty(singlePage.spec.cover)} ">
13
+ < img class =lazyload th:src ="${singlePage.spec.cover} "
14
+ data-sizes =auto th:alt ="${singlePage.spec.cover} " width =3200 height =2048 >
15
+ </ figure >
16
+ < article >
17
+ < div th:utext ="${singlePage.content.content} "> </ div >
18
+ </ article >
19
+ </ div >
20
+ <!-- 后续做评论组件 -->
21
+ < div id =comments class =comment >
22
+ < halo:comment
23
+ group ="content.halo.run "
24
+ kind ="SinglePage "
25
+ th:attr ="name=${singlePage.metadata.name} "
26
+ colorScheme ="'light' "
27
+ />
28
+ </ div >
29
+ </ div >
30
+
31
+ </ th:block >
32
+ </ html >
33
+
34
+ < script type =text/javascript >
35
+ window . config = {
36
+ data : { } ,
37
+ }
38
+ </ script >
Original file line number Diff line number Diff line change 7
7
author :
8
8
name : Halo
9
9
website : https://www.halo.run
10
- description : A development starter theme with Vite Ecosystem for Halo
10
+ description : A simple, elegant and efficient Halo theme
11
11
logo : https://www.halo.run/logo
12
12
website : https://github.com/f2ccloud/theme-clear
13
13
repo : https://github.com/f2ccloud/theme-clear.git
14
14
settingName : " theme-clear-setting"
15
15
configMapName : " theme-clear-configMap"
16
16
version : 1.0.0
17
17
require : " >=2.0.0"
18
- customTemplates :
19
- page :
20
- - name : 关于
21
- description : 关于
22
- screenshot :
23
- file : about.html
18
+ # customTemplates:
19
+ # page:
20
+ # - name: 关于
21
+ # description: 关于
22
+ # screenshot:
23
+ # file: about.html
You can’t perform that action at this time.
0 commit comments