Hogwarts

zxy's personal website

0%

Go to the correct folder

1
cd hexo

For example, as for macos operating system, I store all the hexo post information in the folder called hexo, so cd into that folder. When you enter the correct folder, the path name will show on the left side of the terminal. Here, it will display hexo.

Create new blogs

Enter the following bash command

1
hexo new "the name of the new blog"

Find and edit the new blog

After that, open the /username/root folder name/source/_posts. More concretely, my absolute path is /Users/zxy/hexo/source/_posts. You will find a new markdown file named in the name of the new blog.md

Then, open this file in vscode, you can use various extension in vscode to help you to start writing your blog!

Generate website and preview

Enter the following in root dictionary to generate static website.

1
hexo g

Enter the following to preview preview your blog locally.

1
hexo s

Push to github

Enter the following to upload it to github. Finally ,you can see the new content in your github.io website.

1
hexo d
Reference

Contents refer to
https://sunhwee.com/posts/6e8839eb.html#toc-heading-14

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.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment