我的博客:五里霧中

准备工作

Node.js 安装

Node.js安装、环境变量配置、报错解决方法

Github 注册和仓库

视频:【2021最新版】保姆级Hexo+github搭建个人博客

简书:使用Hexo和GitHub搭建个人博客(2021新版)

Hexo 安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
安装验证:

**node -v**

**npm -v**

**git --version**

hexo下载:**npm install express -g**

**hexo -v**

生成ssh: **ssh-keygen -t rsa -C "邮箱地址"**

.ssh生成路径:C:\Users\你他娘的用户名\.ssh

测定ssh是否绑定成功:**ssh -T git@github.com**

安装hexo-deployer-git自动部署发布工具:npm install hexo-deployer-git --save

初始化: hexo init

清除之前生成配置: hexo clean

生成静态文章: hexo g

服务预览:hexo s

部署文件并上传至Git: hexo d

主题更换

Matery 主题

hexo博客matery主题的个性化配置

【源码开放】Hexo+Github+Coding 博客butterfly 和 matery 主题 搭建完全教程【整理】

Butterfly 主题

Butterfly

hexo搭建博客-butterfly主题详细版

标签外挂

Note

1
2
3
{% note [class] [no-icon] [style] %}
Any content (support inline tags too.io).
{% endnote %}
名称 用法
class 【可选】标识,不同的标识有不同的配色
( default / primary / success / info / warning / danger )
no-icon 【可选】不显示 icon
style 【可选】可以覆盖配置中的 style
(simple/modern/flat/disabled)

Tabs

1
2
3
4
5
6
7
8
9
10
11
12
13
{% tabs test1 %}
<!-- tab -->
**This is Tab 1.**
<!-- endtab -->

<!-- tab -->
**This is Tab 2.**
<!-- endtab -->

<!-- tab -->
**This is Tab 3.**
<!-- endtab -->
{% endtabs %}

Label

1
{% label text color %}
参数 解释
text 文字
color 【可选】背景颜色,默认为 default
default/blue/pink/red/purple/orange/green

Timeline

1
2
3
4
5
{% timeline 2022 %}
<!-- timeline 01-02 -->
这是测试页面
<!-- endtimeline -->
{% endtimeline %}

主题魔改

透明度

  • 首页封面图深色效果

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
// 注意:!important意味着强制的属性,权重最高
background: rgba(255,255,255,0.8)!important
>.post_cover
// 文章的图片透明度(可选)
filter: opacity(0.85)
>.card-widget
// 侧边卡片背景透明度
background: rgba(255,255,255,0.8)!important

>// 以下可选
>.avatar-img
// 头像的透明度
filter: opacity(0.85)
>.thumbnail
// 其余图片的透明度
filter: opacity(0.85)

使用Typora 写 MarkDown文档

Markdown基础教程(Typora版)

Typora使用简介与插入数学公式

Typora数学公式汇总

Typora字体颜色设置的3种方案

内联公式显示出问题:在Hexo中渲染MathJax数学公式

一些踩的坑

hexo d错误:fatal: unable to auto-detect email address

解决hexo图片不展示问题