Blog Operation Record

Blog Operation

Overview

This document records the blog operation process from the beginning, including problems encountered, solutions, and experience summary.


Day 1: Blog Setup and First Deploy

1.1 Environment Configuration

Local Environment:

  • OS: Windows 11
  • WSL: Ubuntu (WSL2)
  • Hexo Version: 8.1.1
  • Theme: anzhiyu
  • Blog Path: D:\2\blog-demo

Remote Environment:

  • GitHub Pages
  • Custom Image Host

1.2 Initial Deploy

First time deploying the blog:

1
2
3
4
cd D:\2\blog-demo
npx hexo clean
npx hexo generate
npx hexo deploy

Result: Successfully deployed to GitHub Pages!


Day 2: Adding Images and Optimization

2.1 Image Handling

Problem: How to add images to blog posts?

Solutions:

  1. Search free images from Unsplash/Pexels
  2. Create custom SVG diagrams
  3. Use custom image host for storage

2.2 SVG Image Creation

Created custom SVG images for blog posts:

1
2
3
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400">
<!-- Custom diagram content -->
</svg>

Advantage: No copyright issues, fully customized.

2.3 Problems Encountered

Problem Solution
Chinese filenames in URLs Use English filenames only
Git user identity error Configure email and name in git config
Image upload API error Found correct endpoint /api/v1/upload

Day 3: Documentation and Privacy Protection

3.1 Local Documentation

Created local operation guide: D:\2\config\blog-deploy-guide.md

Contains:

  • Complete deployment process
  • Common commands reference
  • Troubleshooting guide
  • Privacy protection rules

3.2 Privacy Protection

Important Rules:

  1. Never upload tokens, passwords, or API keys to public blog
  2. Store sensitive information only in local documents
  3. Check content before each deployment
  4. Immediately delete any posts that leak sensitive info

3.3 Blog Management Rules

Rule Description
No duplicate posts Keep only one version of similar content
Update existing posts Edit original posts instead of creating new ones
English filenames Avoid URL encoding issues
Check before deploy Ensure no sensitive info in posts

Experience Summary

What Worked Well

  1. Custom SVG Images: Flexible, no copyright issues
  2. Local Documentation: Easy to reference, keeps sensitive info private
  3. Image Host Integration: Fast and reliable image storage
  4. Git Deployment: Simple and effective publishing workflow

Lessons Learned

  1. Always use English filenames for better compatibility
  2. Check content before deploying to avoid leaking sensitive info
  3. Keep documentation local for private information
  4. Test locally first using hexo server before deploying

Common Commands

Command Description
npx hexo new "title" Create new post
npx hexo clean Clean cache
npx hexo generate Generate static files
npx hexo deploy Deploy to GitHub
npx hexo server Local preview

Future Plans

  1. Continue documenting project deployments
  2. Improve blog theme and customization
  3. Add more technical tutorials
  4. Optimize deployment speed and workflow

Conclusion

The blog system is now fully operational with proper documentation, privacy protection, and a smooth deployment workflow. This operation record serves as a reference for future blog updates and maintenance.