hexo-theme-clarity 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_config.yml +16 -12
- package/layout/_partial/after_footer.pug +11 -10
- package/layout/_partial/footer.pug +4 -0
- package/layout/_widget/info.pug +6 -5
- package/layout/_widget/recent_comments.pug +3 -2
- package/layout/_widget/recent_posts.pug +2 -1
- package/package.json +2 -1
- package/.travis.yml +0 -5
package/_config.yml
CHANGED
|
@@ -46,7 +46,6 @@ waline: ## See: https://waline.js.org/
|
|
|
46
46
|
pageSize: 30 ## The desired number of comments shown in each page.
|
|
47
47
|
wordLimit: 500 ## Limit the number of words in comments, 0 means no limit.
|
|
48
48
|
requiredMeta: ['nick','mail'] ## Required user information, e.g. ['nick','mail','link']
|
|
49
|
-
count: 5 ## The number comments displayed in the recent_comments widget, default is 10.
|
|
50
49
|
locale: {
|
|
51
50
|
placeholder: '欢迎评论',
|
|
52
51
|
sofa: '来发评论吧~'
|
|
@@ -69,13 +68,18 @@ self_search: false ## Use a jQuery-based local search engine, true/false.
|
|
|
69
68
|
google_analytics: ## Your Google Analytics tracking id, e.g. UA-42425684-2
|
|
70
69
|
baidu_analytics: ## Your Baidu Analytics tracking id, e.g. 8006843039519956000
|
|
71
70
|
microsoft_clarity: ## Your Microsoft Clarity tracking id, e.g. zg2ctuea9j
|
|
72
|
-
fancybox:
|
|
71
|
+
fancybox: false ## If you want to use fancybox please set the value to true.
|
|
73
72
|
show_category_count: false ## If you want to show the count of categories in the sidebar widget please set the value to true.
|
|
74
|
-
toc_number:
|
|
73
|
+
toc_number: false ## If you want to add list number to toc please set the value to true.
|
|
75
74
|
shareto: false ## If you want to use the share button please set the value to true, and you must have hexo-helper-qrcode installed.
|
|
76
75
|
busuanzi: false ## If you want to use Busuanzi page views please set the value to true.
|
|
77
76
|
wordcount: false ## If you want to display the word counter and the reading time expected to spend of each post please set the value to true, and you must have hexo-wordcount installed.
|
|
78
77
|
widgets_on_small_screens: false ## Set to true to enable widgets on small screens.
|
|
78
|
+
algolia: ## Algolia docsearch
|
|
79
|
+
enable: false
|
|
80
|
+
app_id:
|
|
81
|
+
api_key:
|
|
82
|
+
index_name:
|
|
79
83
|
canvas_nest:
|
|
80
84
|
enable: false ## If you want to use dynamic background please set the value to true, you can also fill the following parameters to customize the dynamic effect, or just leave them blank to keep the default effect.
|
|
81
85
|
color: ## RGB value of the color, e.g. "100,99,98"
|
|
@@ -103,6 +107,9 @@ dark: false ## If you want to toggle between light/dark themes, set the value to
|
|
|
103
107
|
totop: true ## If you want to use the rocketship button to return to the top, set the value to true.
|
|
104
108
|
external_css: false ## If you want to load an external CSS file, set the value to true and create a file named "external.css" in the source/css folder.
|
|
105
109
|
post_content_length: 180 ## Set the length of the post summary displayed on home page when no description written.
|
|
110
|
+
show_forever: false ## Whether to display foreverblog link in footer.
|
|
111
|
+
recent_post_num: 5 ## Recent post number
|
|
112
|
+
recent_comment_num: 5 ## Recent comment number
|
|
106
113
|
icp: ## China mainland only, show icp info on the bottom.
|
|
107
114
|
bei: ## China mainland only, show bei info on the bottom.
|
|
108
115
|
|
|
@@ -125,28 +132,25 @@ widgets: ## Seven widgets in sidebar provided: search, info, category, tag, rece
|
|
|
125
132
|
- info
|
|
126
133
|
- category
|
|
127
134
|
- tag
|
|
128
|
-
- recent_posts
|
|
129
|
-
- recent_comments
|
|
130
|
-
- links
|
|
135
|
+
# - recent_posts
|
|
136
|
+
# - recent_comments
|
|
137
|
+
# - links
|
|
131
138
|
|
|
132
139
|
info:
|
|
133
140
|
avatar: /img/avatar.png
|
|
134
141
|
discription: To be a better man.
|
|
135
142
|
outlinkitem:
|
|
136
|
-
- name:
|
|
137
|
-
outlink: https://twitter.com/username
|
|
138
|
-
message: Twitter
|
|
139
|
-
- name: github
|
|
143
|
+
- name: github # fa-{name}
|
|
140
144
|
outlink: https://github.com/username
|
|
141
145
|
message: Github
|
|
142
146
|
- name: envelope
|
|
143
147
|
outlink: mailto:admin@domain.com
|
|
144
148
|
message: Email
|
|
145
|
-
color: '#007bff'
|
|
149
|
+
# color: '#007bff'
|
|
146
150
|
- name: rss
|
|
147
151
|
outlink: /atom.xml
|
|
148
152
|
message: RSS
|
|
149
|
-
color: '#ff5722'
|
|
153
|
+
# color: '#ff5722'
|
|
150
154
|
|
|
151
155
|
links:
|
|
152
156
|
- title: site-name1
|
|
@@ -48,13 +48,14 @@ if page.mathjax2
|
|
|
48
48
|
script(type='text/javascript', src=url_for(theme.js) + '/codeblock-resizer.js' + '?v=' + theme.version)
|
|
49
49
|
script(type='text/javascript', src=url_for(theme.js) + '/smartresize.js' + '?v=' + theme.version)
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
script.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
if theme.algolia.enable == true
|
|
52
|
+
script(src='https://unpkg.com/@docsearch/js@3.9.0/dist/umd/index.js')
|
|
53
|
+
script.
|
|
54
|
+
docsearch({
|
|
55
|
+
appId: "#{theme.algolia.app_id}",
|
|
56
|
+
apiKey: "#{theme.algolia.api_key}",
|
|
57
|
+
indexName: "#{theme.algolia.index_name}",
|
|
58
|
+
insights: true,
|
|
59
|
+
container: "#docsearch",
|
|
60
|
+
debug: false
|
|
61
|
+
});
|
|
@@ -2,6 +2,10 @@ footer#footer
|
|
|
2
2
|
span(style={'margin-right': '10px'})= '© ' + date(Date.now(), 'YYYY') + ' '
|
|
3
3
|
a(href=url_for('.'), rel='nofollow')= config.title
|
|
4
4
|
|
|
5
|
+
if theme.show_forever
|
|
6
|
+
span(style={'margin-right': '10px'})
|
|
7
|
+
a(target='_blank', href='https://www.foreverblog.cn') 《十年之约》
|
|
8
|
+
|
|
5
9
|
if theme.icp && theme.bei
|
|
6
10
|
<br>
|
|
7
11
|
|
package/layout/_widget/info.pug
CHANGED
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
.site-info__item
|
|
15
15
|
div.item__label 分类
|
|
16
16
|
div.item__value= site.categories.length
|
|
17
|
-
.
|
|
18
|
-
-
|
|
19
|
-
- var
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
if theme.info.outlinkitem
|
|
18
|
+
.social-info
|
|
19
|
+
- for (var item of theme.info.outlinkitem)
|
|
20
|
+
- var styled= item.color ? {color: item.color} : undefined
|
|
21
|
+
a.info-icon(href=item.outlink, title=item.message, target='_blank', style=styled)
|
|
22
|
+
i.fa(class='fa-' + item.name)
|
|
@@ -8,5 +8,6 @@ if theme.waline.enable == true
|
|
|
8
8
|
.widget
|
|
9
9
|
.widget-title
|
|
10
10
|
i.fa.fa-comment-o= ' ' + __('recent_comments')
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
if theme.recent_comment_num > 0
|
|
12
|
+
#widget-waline-list
|
|
13
|
+
script(type='text/javascript', id="recent-comment", serverURL=theme.waline.serverURL, count=theme.recent_comment_num, src=url_for(theme.js) + '/recent-comments.js' + '?v=' + theme.version, async)
|
package/package.json
CHANGED