Skip to content

Commit 600d465

Browse files
authored
feat: 增加轻量朋友圈 (#940)
1 parent e433cf7 commit 600d465

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

_config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,17 @@ plugins:
974974
expire_days: 1 # 本地文章缓存数据过期时间(天)
975975
js: https://npm.elemecdn.com/[email protected]/dist/fcircle.min.js # fcircle.min.js的url
976976

977+
# 轻量友链朋友圈
978+
# https://github.com/willow-god/Friend-Circle-Lite
979+
# https://blog.liushen.fun/posts/4dc716ec/
980+
fcircle_lite:
981+
# Set `plugins: ["fcircle_lite"]` to enable in front-matter
982+
private_api_url: # 填写你的fc_Lite地址
983+
page_turning_number: 20 # 点击加载更多时,一次最多加载几篇文章,默认20
984+
error_img: https://i.p-i.vip/30/20240815-66bced9226a36.webp # 头像加载失败时,默认头像地址
985+
css: https://fastly.jsdelivr.net/gh/willow-god/Friend-Circle-Lite/main/fclite.min.css # CSS文件地址
986+
js: https://fastly.jsdelivr.net/gh/willow-god/Friend-Circle-Lite/main/fclite.min.js # JS文件地址
987+
977988
# 消息提示
978989
# izitoast
979990
message:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script>
2+
volantis.layoutHelper("page-plugins", `<div id="friend-circle-lite-root"></div>`)
3+
</script>
4+
<script>
5+
if (typeof UserConfig === 'undefined') {
6+
var UserConfig = {
7+
private_api_url: '<%- theme.plugins.fcircle_lite.private_api_url %>',
8+
page_turning_number: <%- theme.plugins.fcircle_lite.page_turning_number %>,
9+
error_img: '<%- theme.plugins.fcircle_lite.error_img %>',
10+
}
11+
}
12+
</script>
13+
<link rel="stylesheet" href="<%- theme.plugins.fcircle_lite.css %>">
14+
<script src="<%- theme.plugins.fcircle_lite.js %>"></script>

0 commit comments

Comments
 (0)