该文件是 hexo 中默认生成第一篇文章,在此我进行了升级,用该文章记录一些 hexo 使用的笔记。

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$hexo deploy

More info: Deployment

关于搜索

https://butterfly.js.org/posts/ceeb73f/#%E6%90%9C%E7%B4%A2

我用的hexo主题是 buterfly 该主题支持几种搜索,这里我选用了最简单的 local_search 具体的配置是:

  1. 安装 hexo-generator-searchdb

  2. 配置主题的 search use 为: `local_search’ 代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 search:
# Choose: algolia_search / local_search / docsearch
# leave it empty if you don't need search
use: local_search
placeholder: 搜索

# Local Search
local_search:
# Preload the search data when the page loads.
preload: false
# Show top n results per article, show all results by setting to -1
top_n_per_article: 1
# Unescape html strings to the readable one.
unescape: false
CDN:

新建文章

1
hexo new post -p front-end/nvm-node-manage "用 NVM 管理 npm 和 node 的版本"