Hexo设置

渲染LaTeX公式

1、卸载marked渲染器,安装markdown it plus渲染器

1
2
npm uninstall hexo-render-marked --save
npm install hexo-renderer-markdown-it-plus --save

2、配置_config.yml文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
markdown_it_plus:
highlight: true
html: true
xhtmlOut: true
breaks: true
langPrefix:
linkify: true
typographer:
quotes: “”‘’
plugins:
- plugin:
name: markdown-it-katex
enable: true
- plugin:
name: markdown-it-mark
enable: false

3、在head中加载Katex的CSS样式

/themes/所选主题/layout/_partial/head.ejs中写入

1
<link href="https://cdn.bootcss.com/KaTeX/0.7.1/katex.min.css" rel="stylesheet">

4、遇到报错Cannot find module 'markdown-it-katex'

1
npm install markdown-it-katex --save

首页文章截断显示

< !--more-- >

live2d模型

blog/_config.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
live2d:
enable: true
scriptFrom: local
pluginRootPath: live2dw/
pluginJsPath: lib/
pluginModelPath: assets/
tagMode: false
debug: false
model:
use: live2d-widget-model-模型名
display:
position: right
width: 150
height: 300
mobile:
show: true

下载模型

1
npm install live2d-widget-model-模型名

复制blog/node_modeleslive2d-widget-model-模型名blog/live2d_models
hijiki 黑猫
tororo 白猫

更换主题

yelee

1
git clone https://github.com/MOxFIVE/hexo-theme-yelee.git themes/yelee

报错error: RPC failed; curl 18 transfer closed with outstanding read data remaining解决办法:

1
git config --global http.postBuffer 524288000

Next主题

头部

themes/next/_config.yml avatar 设置头像图片名
themes/next/source/images 头像图片存储

底部

图标

themes/next/_config.yml icon:
图标内容来自Font Awesome

顶部

黑线

themes/next/source/css/_common/components/header/headerband.styl
background: $headband-bg;

页面颜色、位置等设置

themes/next/source/css/_custom/custom.styl
参考 reuixiy.github.io

页面宽度

themes/next/source/css/_schemes/Picses/layout.styl

1
2
3
4
5
6
header{ width: 百分比 !important; }
header.post-header {
width: auto !important;
}
.container .main-inner { width: 百分比; }
.content-wrap { width: calc(100% - 260px); }

简介栏文本颜色设置

themes/next/source/css/_variables/Pisces.styl

Yelee主题

文章目录
  1. 1. 渲染LaTeX公式
    1. 1.1. 1、卸载marked渲染器,安装markdown it plus渲染器
    2. 1.2. 2、配置_config.yml文件
    3. 1.3. 3、在head中加载Katex的CSS样式
    4. 1.4. 4、遇到报错Cannot find module 'markdown-it-katex'
  2. 2. 首页文章截断显示
  3. 3. live2d模型
  4. 4. 更换主题
    1. 4.1. yelee
  5. 5. Next主题
    1. 5.1. 头部
    2. 5.2. 底部
      1. 5.2.1. 图标
    3. 5.3. 顶部
      1. 5.3.1. 黑线
    4. 5.4. 页面颜色、位置等设置
    5. 5.5. 页面宽度
    6. 5.6. 简介栏文本颜色设置
  6. 6. Yelee主题