Hexo 快速入门
mr00ff

简介

     Hexo 是一个快速、简单且功能强大的博客框架。
     你用 Markdown(或其他标记语言)写帖子,
     Hexo 会在几秒钟内生成带有漂亮主题的静态文件。

个人理解:

hexo 是一个解释器,将 标记语言(markdown 等.) 转化成 html 代码,并赋能 分类,标签,评论,搜索 等 博客功能 进行集中管理,是一个非常轻便管理工具.


官网

hexo

注意:

环境介绍:

hexo: 5.4.0
hexo-cli: 4.2.0
node: 14.16.1

安装

1
2
3
4
5
6
7
8
9
10
11
12
13
# 手脚架
npm i -g hexo-cli

# 初始化项目
hexo init hexo-frist-project

# 运行服务
hexo s -o
INFO Validating config
INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.

# 恭喜你拥抱了 Hexo

常用命令

1
2
3
4
5
6
# 启动博客服务
hexo s

# 生成静态页面
hexo g


命令大全

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
hexo --help
INFO Validating config
Usage: hexo <command>

Commands:
# 清除缓存
clean Remove generated files and cache.
# 获取当前 config 内容
config Get or set configurations.
# 发布博客到网页
deploy Deploy your website.
# 生成静态文件
generate Generate static files.
# 查看命令帮助
help Get help on a command.
# 创建新项目
init Create a new Hexo folder.
# 列出站点信息
list List the information of the site
# 从其他站点迁移到 Hexo
migrate Migrate your site from other system to Hexo.
# 创建新页面
new Create a new post.
# 从草稿箱发布
publish Moves a draft post from _drafts to _posts folder.
# 使用渲染插件渲染文件
render Render files with renderer plugins.
# 开启服务
server Start the server.
# 查看版本
version Display version information.

Global Options:
--config Specify config file instead of using _config.yml
--cwd Specify the CWD
--debug Display all verbose messages in the terminal
--draft Display draft posts
--safe Disable all plugins and scripts
--silent Hide output on console
  • 本文标题:Hexo 快速入门
  • 本文作者:mr00ff
  • 创建时间:2021-06-06 14:00:00
  • 本文链接:https://www.sysxo.com/Hexo/Hexo 快速入门.html
  • 版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
 评论