hexo搭建

由于我将hexo搭建在闲置手机上,环境是安卓10+安卓终端termux,以下为过程记录:

termux 安装 nodejs

apt install nodejs

安装完成后通过node -vnode -v检测是否安装成功与安装版本

安装git

hexo的安装依赖git,所以安装hexo之前,需要先安装git
pkg install git -y 安装git,其中 -y是一个参数,表示过程中的所有选择均选择yes

安装Hexo

阅读Hexo官方文档,通过 npm install -g hexo-cli安装Hexo

运行Hexo

在运行hexo之前,需要先通过
mkdir <name>
来创建一个hexo服务运行的文件夹
然后通过
cd <name>
打开文件夹
执行
npm install
最后可以通过
hexo server
来运行hexo。
至于hexo配置文件编写参考hexo官方文档

关于Front-matter

Front-matter是每个markdown文件开头的一段标记参数,形如:

1
2
3
4
5
---
title: hexo搭建
参数2:
参数3:
---

hexo的Front-matter参考

我还安装了主题;主题的Front-matter参考


hexo搭建
http://blog.ulna520.com/2024/07/03/hexo/
Veröffentlicht am
July 3, 2024
Urheberrechtshinweis