Content
Prefix
-
abbrlink: Automatically generated when the post is created. You can jump to another post like this:
[Prefix in Hexo Blog](12c56117)to get the link of this post Hexo Wiki. -
mathjax: If you want to apply equations in your post, please add
mathjax: truein the front. -
cover: The cover image of the post. You can add it by
cover: /images/xxx.jpg. -
toc: Table of Contents. If you want to add a TOC in your post, please add
toc: truein the front. -
top: If you want to make this post stay on the top of the blog, please add
top: truein the front.
Usage
-
hexo new [post/draft] [title]: Create a new post or draft. The title should be enclosed in quotes if it contains spaces. -
hexo clean: Clean the cache files (db.json) and generated files (public). -
hexo generate: Can be simplified tohexo g. Generate static files. -
hexo server: Can be simplified tohexo s. Start the server (usually athttp://localhost:4000/). -
Deploy the blog on Github Page:
-
Configure the info in
_config.yml:deploy: type: git repo: [example: https://github.com/hexojs/hexojs.github.io] branch: main token: [Your Github Token] message: [Your commit message] -
Type
hexo deployorhexo din CLI and wait for several minutes.
-
DIY
Add Math Formula
To use math formulas in your Hexo blog, you can install the hexo-renderer-markdown-it package and configure it accordingly. Make sure to follow the installation instructions in the documentation here.
In my own blog, the formula appears twice in different types, so I check f12 and hide the .katex-html class. Hope it can help.