EuDs

EuDs

EuDs's Blog
twitter
github

Blog Setup

Process#

Documenting the process of building a blog

  1. The framework chosen is Hexo, and the theme chosen is Fluid. Local deployment went smoothly by following the tutorial.
  2. 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.
  3. After configuring locally, I needed to deploy to Github Pages. In the tutorial provided by Hexo, the built-in token variable GITHUB_TOKEN of Github Action is used. According to the official documentation, to prevent recursive builds, the code pushed with GITHUB_TOKEN won't trigger any actions again. However, considering that I hope to further trigger and understand Github Action in the future, I chose to set my own key.
  4. This took the most time. I took many detours and finally referred to Automatically Deploying a Blog Using GitHub Actions.
  5. 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.
  6. Adding Google verification:
    I referred to Making a Blog Hosted on Github Pages Searchable by Google
    1. (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.
  7. Reducing loading time, not yet implemented, but recording a few good articles for reference:
  8. Inserting images, this article is quite comprehensive:
    Various Ways to Insert Images in Hexo Blogs
  9. Adding last modified time:
    Set enable for post: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

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.