0%

HEXO常用设置(next主题)

前言

Hexo 是一个高效、快速简洁且高效的静态博客框架。Hexo使用Markdown(或其他渲染引擎)解析文章,在几秒之内,即可利用酷炫的主题生成静态网页。

安装

安装参考中文官网的教程 https://hexo.io/zh-cn/。

themes

本人常用的俩个主题为Archernext,以下多数内容针对next主题为例。

常用命令

1
2
3
4
5
6
7
8
9
10
11
hexo new draft 文件名(新建草稿)

hexo publish 文件名(把草稿发表到正式文档中)

hexo server(启动hexo 服务)

hexo clean(清除编译文件)

hexo generate (编译静态文件)

hexo deployer(上传github,需要安装hexo-deployer-git)

上传github

(1)在hexo目录下安装delpoyer插件

1
npm install hexo-deployer-git --save

(2)在根目录的_config.yml文件中添加

1
2
3
4
5
6
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: git
repo: http://github.com/smartbra/blog.git
branch: master

(3)输入如下代码上传Github。

1
hexo g -d

开启插入图片

正常在hexo目录下安装hexo-asset-image —save 即可

1
hexo-asset-image --save

并在根目录的_config.yml文件中开启如下
1
post_asset_folder: true

在markdown中使用如下语句添加图片。
其中图片放在使用hexo new 新建目录下的文件夹中中。
1
<img src="log3/HeliumPiping.jpg" title="氦气管路供回压力" style="zoom:60%" >

LaTeX