Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
快速开始
Create a new post
bash
$ hexo new "My New Post" |
More info: Writing
Run server
bash
$ hexo server |
More info: Server
Generate static files
bash
$ hexo generate |
More info: Generating
Deploy to remote sites
bash
$ hexo deploy |
搜索配置
bash
# 提交索引到 algolia |
常用命令
bash
hexo clean |
清除缓存文件 (db.json
) 和已生成的静态文件 (public
)。
bash
hexo generate |
生成静态文件。
bash
hexo deploy |
部署你的网站。
bash
hexo server |
启动服务器。 默认情况下,访问网址为: http://localhost:4000/
。
bash
# 组合命令 |
文章类操作
新建文章
bash
# hexo new [layout] <title> |
Front-matter 设置
Front-matter 是文章最上方以—分隔的区域,用于指定文章的变量设置。
bash
title: 如何在hexo上创建一篇文章 |
参数 | 描述 | 默认值 |
---|---|---|
layout | 布局 | 无 |
title | 标题 | 无 |
date | 建立日期 | 文件建立日期 |
updated | 更新日期 | 文件更新日期 |
comments | 开启文章评论功能 | true |
tags | 标签 | (不适用于分页) |
categories | 分类 | (不适用于分页) |
permalink | 覆盖文章网址 | 无 |
bash
# 示例 |
More info: Deployment
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 htdocs!