Process#
Documenting the process of building a blog
- The framework chosen is Hexo, and the theme chosen is Fluid. Local deployment went smoothly by following the tutorial.
- When adjusting the configuration, I encountered a problem. Initially, I directly used
npm install --save hexo-theme-fluid, but when modifying the configuration, although there was documentation, I didn't know how the various configurations were nested, so I chose option two. - After configuring locally, I needed to deploy to Github Pages. In the tutorial provided by Hexo, the built-in token variable
GITHUB_TOKENofGithub Actionis used. According to the official documentation, to prevent recursive builds, the code pushed withGITHUB_TOKENwon't trigger any actions again. However, considering that I hope to further trigger and understandGithub Actionin the future, I chose to set my own key. - This took the most time. I took many detours and finally referred to Automatically Deploying a Blog Using GitHub Actions.
- The action has run successfully, but when accessing it, I found that it still returned a 404 error. After checking, I realized that I hadn't configured a publishing source for my GitHub Pages site.
- Adding Google verification:
I referred to Making a Blog Hosted on Github Pages Searchable by Google- (Omitted) When verifying website ownership, choose to verify using HTML tags. The head path of the fluid theme is
\themes\fluid\layout\_partials\head.ejs.
- (Omitted) When verifying website ownership, choose to verify using HTML tags. The head path of the fluid theme is
- Reducing loading time, not yet implemented, but recording a few good articles for reference:
- Inserting images, this article is quite comprehensive:
Various Ways to Insert Images in Hexo Blogs - Adding last modified time:
Setenableforpost:copyright:update_date:in the theme configuration file_config.yml.
Quick Start#
Create a new post#
$ hexo new "My New Post"
More info: Writing
Run server#
$ hexo server
More info: Server
Generate static files#
$ hexo generate
More info: Generating
Deploy to remote sites#
$ hexo deploy
More info: Deployment