2023-09-15 16:40:41 +08:00

54 lines
817 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Hexo
date: 2022-11-18 10:30:31
author: 文永达
---
# Hexo
启动本地开发服务器
```shell
hexo server
# or
hexo s
```
清空本地缓存
```shell
hexo clean
```
构建并发布到Git上
```shell
hexo g -d
```
只构建
```shell
hexo g
```
将安装的主题推送到Git上
因为主题也是一个git项目需要先把`.git`剪切到任意位置
`.git`文件夹在 `themes/butterfly`目录下,是一个隐藏文件夹
```shell
git rm --cache themes/butterfly
git status
git add themes/butterfly
```
新建文章
```shell
hexo new [layout] <title>
```
新建一篇文章。如果没有设置 `layout` 的话,默认使用 [_config.yml](https://hexo.io/zh-cn/docs/configuration) 中的 `default_layout` 参数代替。如果标题包含空格的话,请使用引号括起来。