- 安装Volta管理Node版本
curl https://get.volta.sh | bash && source ~/.bashrc
- 安装 Node.js (LTS)
volta install node@24
- 安装hexo & 初始化项目
npm install -g hexo-cli
mkdir blog/hexo
cd blog && hexo init hexo && cd hexo
npm install
- 拉取Stellar主题源码
git clone https://github.com/xaoxuu/hexo-theme-stellar.git themes/stellar
- 补齐Stellar主题所需插件
npm install probe-image-size hexo-renderer-ejs hexo-renderer-stylus hexo-renderer-pug hexo-renderer-sass hexo-generator-search --save
- 修改
_config.yml,将theme 设置为 stellar - 修改
_config.yml 基本内容,否则Stellar会报错 - 修改
themes/stellar/layout/_partial/head.ejs
nano themes/stellar/layout/_partial/head.ejs
Ctrl + W:json_ld
Ctrl + K
<%# json_ld() %>
- 日常运行与维护
cd ~/blog/hexo
hexo clean && hexo g && hexo s -p 8097