Hexo项目:新增侧边框配置
项目最终效果图
1.默认的侧边框
在主题的config.yml
文件中配置:
# sidebar侧边栏
sidebar:
on: true
position: left # left right
widget_library:
side_blogger:
on: true
avatar: http://api.btstu.cn/sjtx/api.php?lx=c1&format=images
shape: rectangle # circle, rectangle
url: /about/
title: 青墨书晚风
subtitle: 我是副标题
jinrishici: true # Poetry Today. You can set a string, and it will be displayed when loading fails.
fontFammily: Long Cang,cursive
background: '#fff'
order: # 卡片排序, 数值越小,越在上面
social:
- icon: fas fa-rss
url: /atom.xml
- icon: fas fa-envelope
url: mailto:me@xxx.com
- icon: fab fa-github
url: https://github.com/yuang01/hexo-theme-bamboo
- icon: fab fa-qq
url: tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=你的qq号码
# ---------------------------------------
# category widget
side_category:
on: true
background: '#fff'
order: # 卡片排序(widget都有),任意数字,数字小的在上面
header:
icon: fas fa-folder-open
icon_color: # 标题字体颜色
title: 文章分类
url: /blog/categories/
# ---------------------------------------
# tagcloud widget
side_tagcloud:
on: true
background: '#fff'
order:
header:
icon: fas fa-tags
icon_color:
title: 热门标签
url: /tags/
min_font: 14
max_font: 24
color: true
start_color: '#999'
end_color: '#555'
# ---------------------------------------
# recent_post widget
side_recent_post:
on: true
background: '#fff'
limit: 5
sort: update # date
order:
header:
icon: fas fa-book
icon_color:
title: 最新文章
url: /tags/
# ---------------------------------------
# side_archives widget
side_archives:
on: true
type: monthly # yearly or monthly or yearly
format: MMMM YYYY # eg: YYYY年MM月 or YYYY
timeOrder: -1 # Sort of order. 1, asc for ascending; -1, desc for descending 时间排序
limit: 8 # if set 0 will show all
order: # widget order 卡片排序
background: '#fff'
header:
icon: fas fa-archive
icon_color: red
title: 归档
# ---------------------------------------
# side_webinfo widget
side_webinfo:
background: '#fff'
order:
header