Liuxiaozhu's Blog

Recording, Sharing and Practicing

0%

Hello World

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.
LZJ: The above is generated automatically. And this page is a hello-world for hexo in the beginning. Honestly speaking, a page which not belongs to me but exists in my blog is annoying for me at first time. But on second thought, I can revise this article by adding more details or instructions, which might be easily forgot, to help me write the blog.

Quick Start

Create a new post

1
$ hexo new "My New Post"

Or

1
$ hexo new post "My New Post"

The “My New Post” is the title of my new post :P

More info: Writing

By the way, I turn on the “categories” tag in every post. So, if posible, add the following contents at the top of articles.

1
2
3
4
5
---
title: New Title
date: 2020-08-16 09:33:36
categories: New Category
---

Run server

1
$ hexo server

Or its abbreviation

1
$ hexo s

More info: Server

Generate static files

1
$ hexo generate

Or its abbreviation

1
$ hexo g

More info: Generating

Deploy to remote sites

1
$ hexo deploy

Or its abbreviation

1
$ hexo d

Clean cache and static file

1
$ hexo clean

This command is used to clean cache file db.json and static file public.

More info: Deployment

After I write a new article and want to post it

1
2
$ hexo clean
$ hexo g -d #等价于执行hexo g 后再执行一次 hexo d

After that, input the blog address in the browser “liuxiaozhu01.github.io”, and open the blog, then I will see the new article I wrote before :>

Encoding problem

Watch out the encoding problem. In Windows plantform, the system default encoding is GB2312(at least when I open a file or create a new file in VScode, it will be with GB2312 encoding. FUCK U, Microsoft! :)).

So, REMEMBER to open or save the file with encoding UTF-8, or the Chinese character will become garbled!!!