blog/source/_posts/Hexo/Hello-Hexo.md
2022-08-31 10:07:22 +08:00

67 lines
1.2 KiB
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: 'Hello, Hexo!'
keywords: [Hexo]
categories:
- Hexo
tags:
- Hexo
sitemap: true
---
## 命令
**数字化记忆**使用 [Hexo](https://hexo.io/) 创建! Hexo 的其它详细使用方法请参其 [文档](https://hexo.io/docs/) 。
### 新建内容
``` bash
hexo new "我是一篇新帖子" # 新建post
hexo new page "我是一个新页面" # 新建page
```
新建的文件在source/目录中
### 本地服务器
``` bash
hexo server # 可帮助本地预览调试 http://localhost:4000
```
### 生成与发布
``` bash
hexo generate # 生成静态文件默认在public/中
hexo deploy # 发布到指定的地方
```
也可使用以下简化版命令生成发布一次搞定:
``` bash
hexo g -d
```
<!-- more -->
## 语法
### 文章截断
`<!-- more -->` 行之前的文字将会被视为摘要
### 插入YouTube视频
``` code 插入YouTube视频
{% youtube video_id [type] [cookie] %}
```
``` code 插入单个视频
{% youtube xvIRGmKWpFM %}
```
{% youtube xvIRGmKWpFM %}
``` code 插入播放列表并禁用cookie
{% youtube PLmv2z1opFmpVngCz-9tXFd-r6j84mT5vq 'playlist' false %}
```
{% youtube PLmv2z1opFmpVngCz-9tXFd-r6j84mT5vq 'playlist' false %}