基于Hexo搭建Git个人博客

我的博客:五里霧中
准备工作
Node.js 安装
Github 注册和仓库
视频:【2021最新版】保姆级Hexo+github搭建个人博客
简书:使用Hexo和GitHub搭建个人博客(2021新版)
Hexo 安装
1 | 安装验证: |
主题更换
Matery 主题
【源码开放】Hexo+Github+Coding 博客butterfly 和 matery 主题 搭建完全教程【整理】
Butterfly 主题
标签外挂
Note
1 | {% note [class] [no-icon] [style] %} |
名称 | 用法 |
---|---|
class | 【可选】标识,不同的标识有不同的配色 ( default / primary / success / info / warning / danger ) |
no-icon | 【可选】不显示 icon |
style | 【可选】可以覆盖配置中的 style (simple/modern/flat/disabled) |
Tabs
1 | {% tabs test1 %} |
Label
1 | {% label text color %} |
参数 | 解释 |
---|---|
text | 文字 |
color | 【可选】背景颜色,默认为 default default/blue/pink/red/purple/orange/green |
Timeline
1 | {% timeline 2022 %} |
主题魔改
透明度
- 首页封面图深色效果
butterfly\source\css_layout\head.styl
1
2
3
4
5
6
7 &:not(.not-top-img):before
position: absolute
width: 100%
height: 100%
background-color: alpha($dark-black, .3) // 即rgba(0,0,0,0.3),使得顶部图颜色较深
content: ''
>// background-color: alpha($dark-black, .3) 3改为0,首页封面图无深色效果
- 透明度修改
butterfly\source\index 添加在后面
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 >body
// 颜色只是示范作用
background: antiquewhite
>.recent-post-item
// 注意: 意味着强制的属性,权重最高
background: rgba(255,255,255,0.8)
>.post_cover
// 文章的图片透明度(可选)
filter: opacity(0.85)
>.card-widget
// 侧边卡片背景透明度
background: rgba(255,255,255,0.8)
>// 以下可选
>.avatar-img
// 头像的透明度
filter: opacity(0.85)
>.thumbnail
// 其余图片的透明度
filter: opacity(0.85)
使用Typora 写 MarkDown文档
内联公式显示出问题:在Hexo中渲染MathJax数学公式
一些踩的坑
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 五里霧中!