之前写了hexo安装教程,很多人在搭建完自己的hexo博客后,却又不知道如何写博客、上传博文。今天给刚入门的新手分享一下 Hexo编写上传文章教程 。

Step 1:写博客

概要

  1. 首先,你需要了解markdown语法,如果不了解可以百度markdown语法
  2. 参考主题默认文章 Hello Word,不同的Hexo主题对md文件格式可能不一样。
  3. 下载一个编辑器,推荐vscode(轻量、可拓展性强)。也可以使用我的云桌面可视化编辑md文件

首先让我们看看在安装hexo默认主题landscape的默认文章 (在博客根目录下的 \source\_posts 下 )

---
title: Hello World
---
Welcome to [Hexo](https://hexo.io/)! This is your very first post. Check [documentation](https://hexo.io/docs/) for more info. If you get any problems when using Hexo, you can find the answer in [troubleshooting](https://hexo.io/docs/troubleshooting.html) or you can ask me on [GitHub](https://github.com/hexojs/hexo/issues).

## Quick Start

### Create a new post

``` bash
$ hexo new "My New Post"
```

More info: [Writing](https://hexo.io/docs/writing.html)

### Run server

``` bash
$ hexo server
```

More info: [Server](https://hexo.io/docs/server.html)

### Generate static files

``` bash
$ hexo generate
```

More info: [Generating](https://hexo.io/docs/generating.html)

### Deploy to remote sites

``` bash
$ hexo deploy
```

More info: [Deployment](https://hexo.io/docs/deployment.html)

我们只需要新建一个hello-word2.md文件,把文档前面的一部分copy来:

---
title: Hello World
---

title 就是博客文章的标题,然后我们写一个Hello World2,并且写一点内容

---
title: Hello World2
---
### 你好
这是我的第一篇博客

Step 2:上传到Github

然后把这个文件放到 博客根目录下的 \source\_posts 下,然后依次执行

hexo g
hexo d

就可以看到我们的文章了

标签云

ajax AOP Bootstrap cdn Chevereto CSS Docker Editormd GC Github Hexo IDEA JavaScript jsDeliver JS樱花特效 JVM Linux Live2D markdown Maven MyBatis MyBatis-plus MySQL Navicat Oracle Pictures QQ Sakura SEO Spring Boot Spring Cloud Spring Cloud Alibaba SpringMVC Thymeleaf Vue Web WebSocket Wechat Social WordPress Yoast SEO 代理 分页 图床 小幸运 通信原理

Hexo编写上传文章
Hexo编写上传文章