Skip to content

Commit 5b78df2

Browse files
committed
chore: update social_links settings
1 parent 966d22f commit 5b78df2

File tree

4 files changed

+40
-22
lines changed

4 files changed

+40
-22
lines changed

.github/asserts/anatolo_config.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,16 @@ footbar:
3939

4040
# Social Links
4141
# If you want to add more, go to sidebar.pug
42-
github: https://github.com/Lhcfl
43-
44-
zhihu:
45-
QQ:
46-
twitter:
47-
instagram:
48-
rss:
49-
facebook:
50-
weibo:
42+
social:
43+
github: https://github.com/Lhcfl
44+
45+
zhihu:
46+
QQ:
47+
twitter:
48+
instagram:
49+
rss:
50+
facebook:
51+
weibo:
5152

5253
# Nav menu
5354
menu:

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Anatolo设计极致简约,但麻雀虽小,五脏理应俱全。因此,我
2222

2323
码云功能和一些中国特色功能来自 [Anatole-core](https://github.com/mrcore/hexo-theme-Anatole-Core)
2424

25-
26-
2725
## Todo List
2826

2927
- 使用基于json的Ajax

_config.example.yml

+12-10
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,18 @@ footbar:
4141

4242

4343
# Social Links
44-
# If you want to add more, go to `social_links.pug`
45-
github: https://github.com/Lhcfl
46-
47-
zhihu:
48-
QQ:
49-
twitter:
50-
instagram:
51-
rss:
52-
facebook:
53-
weibo:
44+
# The key is the icon name of font-awesome 6, and the value is a link
45+
# except for mail.
46+
social:
47+
github: https://github.com/Lhcfl
48+
49+
zhihu:
50+
qq:
51+
twitter:
52+
instagram:
53+
rss:
54+
facebook:
55+
weibo:
5456

5557
# Nav menu
5658
menu:

layout/partial/social_links.pug

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
ul.social-links
2+
- var socials = Object.fromEntries(Object.entries(theme.social).filter((x) => x[1]));
3+
each link, icon in socials
4+
case icon
5+
when "mail"
6+
li
7+
a(href="mailto:" + link)
8+
i.fa.fa-envelope
9+
when "rss"
10+
li
11+
a(href=link)
12+
i.fa.fa-rss
13+
default
14+
li
15+
a(href=link)
16+
i.fab(class="fa-" + icon)
17+
18+
//- deprecated
219
if theme.github
320
li
421
a(href=theme.github)
@@ -15,7 +32,7 @@ ul.social-links
1532
if theme.zhihu
1633
li
1734
a(href=theme.zhihu)
18-
i.fa.fa-mortar-board
35+
i.fa.fa-zhihu
1936
if theme.twitter
2037
li
2138
a(href=theme.twitter)

0 commit comments

Comments
 (0)