Hexo

建站选型

博客分静态博客和动态博客,静态博客维护成本小,因此我这里选择的是静态博客的方式。主流的几个静态博客框架是jekyll、hexo和hugo,我们这里使用的是 Hexo 进行静态博客的生成,随后部署在Github Pages上。

主要参考的链接是:https://blog.csdn.net/yaorongke/article/details/119089190

关于Hexo

文档:documentation

疑问:troubleshooting

Github:GitHub

常用指令

Windows Powershell 多个指令不能用 && 了,我们可以使用分号 ;

我的常用指令:

1
2
3
4
5
hexo clean
hexo g
hexo s
hexo d
hexo g -d

因此本地测试我们可以直接:

1
hexo clean; hexo g; hexo s

一步到位。

部署的时候可以:

1
hexo clean; hexo g; hexo d

或者

1
hexo g -d

Quick Start

新建博客

1
$ hexo new "My New Post"

More info: Writing

本地起一个服务器

1
$ hexo server

More info: Server

主要是用于本地自测,可以简单用写: hexo s

Generate static files

1
$ hexo generate

More info: Generating

本地生成,hexo g 一键部署.

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

我们配好部署网站后端后,就可以直接用 hexo g -d

关于Next

我们选择的主题theme是Next主题,参考使用文档: https://theme-next.iissnan.com/getting-started.html

Github位置:https://github.com/theme-next/hexo-theme-next

Licensed under CC BY-NC-SA 4.0