How to publish a new post on raylei.space. You write, the agent handles the chores.
YOU creative work · AGENT tedious work · TOGETHER agent runs it, you approve
Decide three things: the title (Chinese is fine), the category (see §4), and a short English slug for the filename. Optionally add tags and whether it's 日常学习 or 工作学习.
The agent creates source/_posts/45-Docker_basics.md with the right front-matter, the 序言 / 正文 / 最后 skeleton and the [第45篇] footer. It also renders the cover and shows it to you. Ask for a different line break if you like (e.g. "split the cover as Docker | 入门笔记"), then approve and it gets uploaded.
Or run it yourself: npm run blog -- new --title "Docker入门笔记" --category 编程算法 --slug Docker_basics --tags Docker,Linux --kind 工作学习
Open the file in VS Code and write. Press Ctrl+K V for a live preview on the side. Paste screenshots with Ctrl+V; they show up in the preview straight away.
Ask for help whenever you want. The agent keeps your voice:
Every pasted image is pushed to the Pics repo as post_img/image-<timestamp>.png, and its link in the post is replaced with the CDN URL.
Or run it yourself: npm run blog -- images 45
npm run blog -- check 45 --online → must say 0 error(s)npx hexo clean; npx hexo s → open http://localhost:4000 and read it onceThe agent never publishes without this go-ahead. It runs:
npx hexo clean; npx hexo g; npx hexo d # site → main branch (live in ~1 min)
git add -A; git commit -m "Add post 45"; git push origin hexo # back up sources
| Ctrl+K V | Preview side-by-side |
| Ctrl+Shift+V | Preview in a tab |
| Ctrl+V | Paste screenshot (saved locally, uploaded in step 4) |
| drag + Shift | Drop an image file into the post |
| Ctrl+Alt+U | PicGo: upload clipboard image immediately (needs token, §6) |
| Ctrl+Shift+O | Jump to a heading |
| Ctrl+Alt+I | Open Copilot chat (talk to the agent) |
A. Paste now, upload later (default, no token needed)
Ctrl+V → saved to tools/paste/45-…/ → step 4 uploads them all in one go.
B. Upload immediately (PicGo)
Ctrl+Alt+U → uploaded and the CDN link is inserted, just like Typora used to do.
---
title: "[编程算法] Docker入门笔记"
date: 2026-12-02 21:30:00
tags: [工作学习, Docker, Linux]
categories: 编程算法
description: "[第45篇] 本章为……的学习笔记。"
top_img: https://cdn.jsdelivr.net/gh/0Rayhlei0/Pics@main/blog_img/algorithm.jpg
cover: https://cdn.jsdelivr.net/gh/0Rayhlei0/Pics@main/cover_img/45-Docker_basics.jpg
---
| Rule | Example |
|---|---|
| Filename = number + English slug | 45-Docker_basics.md |
| Title starts with the category in brackets | [编程算法] … |
| First tag is 日常学习 or 工作学习 | [工作学习, Docker] |
| Description starts with the post number | [第45篇] … |
| Body: 序言/前言 → 正文 → 最后 → references | [1]: https://… "标题" |
| Last line is the post number | [第45篇] |
New images use @main | old posts keep @latest, don't touch |
The category banner, blurred, with the title in white rounded font (Resource Han Rounded) centred on top. 1500×1000 JPG, about 100 KB.
|: --text "LinuxOS|复习笔记"npm run blog -- cover 45 --text "…" --upload --forceRun these in the VS Code terminal (Ctrl+`) from the blog folder. Normally the agent runs them for you.
| Command | What it does |
|---|---|
npm run blog -- next | Next free post number |
npm run blog -- new --title … --category … --slug … | Create post + cover (--upload to upload the cover too) |
npm run blog -- cover 45 [--text "a|b"] [--upload] [--force] | (Re)generate a cover → tools/out/ |
npm run blog -- images 45 [--dry-run] | Upload pasted images, rewrite links |
npm run blog -- upload <file> --dir post_img | Upload any single file to Pics |
npm run blog -- check 45 --online | Check conventions + that every image loads (all = every post) |
npx hexo s | Local preview at localhost:4000 |
npx hexo clean; npx hexo g; npx hexo d | Build and publish the site |
Publishing, source backups and image uploads (steps 2, 4 and 6) all use Git Credential Manager. You sign in once in the browser and Windows stores it securely. No token to copy and nothing expires yearly.
If GitHub ever asks again, a sign-in window simply pops up. Choose Sign in with your browser.
Setup: Git 2.56 at F:\Git · images clone at G:\Personal Blogs\Pics
Needed only for Ctrl+Alt+U instant uploads.
PicGo – Pics, Expiration: 1 year0Rayhlei0/Picsgithub_pat_…)%USERPROFILE%\.picgo\config.json and paste it as the value of "token", then saveThe link probably uses @latest. That alias only points to the last release of Pics (v1.0.35), so newer files aren't there. Change @latest to @main in that link. check 45 --online catches this.
jsDelivr caches @main for up to 12 h. Re-upload with --force (the tool purges the cache automatically), or open https://purge.jsdelivr.net/gh/0Rayhlei0/Pics@main/<path> in a browser.
check says "body has local image paths"You pasted images that haven't been uploaded yet. Run step 4 (npm run blog -- images 45).
Run git push once in the terminal. The browser sign-in window will appear. If it keeps failing, open Windows Credential Manager → Windows Credentials, remove git:https://github.com, then try again.
The token expired or was mistyped. Redo §6 "PicGo token". Uploads through npm run blog -- images keep working without it.
npm run blog -- cover 45 --text "第一行|第二行". Check tools/out/45-….jpg, then add --upload --force.
Ask the agent. A banner needs to be added to Pics/blog_img/, plus mappings in _config.butterfly.yml (category_per_img) and tools/blog.js (CATEGORIES).