简介

准备重新开始使用博客 hexo 的命令都快忘完了 记录一下

gitment 评论

使用 gitment 提供的评论功能,评论是以 issue 的形式记录在 github 仓库里
地址:https://github.com/wuyang910217/blog-comments/issues

hexo 常用命令

首先需要安装 hexo npm i -g hexo
创建新文章:hexo new post-title 后面不加.md

部署到 github 和 gitlab

1
2
3
4
5
6
7
8
# 存为shell脚本
git add .
git commit -m 'update'
git push origin master

hexo clean
hexo g
hexo d

文章模板

scafflods/post.md添加以下内容

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
---
title: {{ title }}
date: {{ date }}
categories: [Others]
tags: [default]
---

# 简介

> Space: the final frontier. These are the voyages of the starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.

<!--more-->

## section1

> Space: the final frontier. These are the voyages of the starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.

## section2

1. Space: the final frontier.
2. These are the voyages of the starship Enterprise.
3. Its five-year mission: to explore strange new worlds,
4. to seek out new life and new civilizations,
5. to boldly go where no man has gone before.

## section3

- Space: the final frontier.
- These are the voyages of the starship Enterprise.
- Its five-year mission: to explore strange new worlds,
- to seek out new life and new civilizations,
- to boldly go where no man has gone before.

## 总结

[Link](https://wuyang910217.github.io)

![Image]()

源码地址

部署到 github 的内容是 html 格式的,而我们的博客源文件(包括 hexo 配置 PWA 支持 主题修改等)需要 push 到私有仓库

我的博客源文件(hexo 整个项目)是存在 gitlab 上的