hexo创建博客

Hexo

基于js的一个静态博客生成器. 支持 Markdown

安装 hexo

1
2
3
4
5
6
# 全局安装
npm install -g hexo-cli

# 局部安装(仅在已有项目使用而不是新建)
# 在项目目录下执行
npm install

新建一个网站

1
2
hexo init blog
cd blog

下载主题

1
npm install hexo-theme-next

设置主题

  • 复制主题资源, 改名配置文件为 _config.主题名.yml
1
cp node_modules/hexo-theme-next/_config.yml _config.next.yml
  • 修改 _config.yml 中的 theme 为 next

  • 其他自定义修改

预览

1
npm run server

参考资料