com um clique
blog-authoring
// Use when creating, editing, previewing, or publishing blog posts through the local working-copy flow, especially when the task involves `content/blog`, `npm run blog:*` commands, or `/blog-preview/...` URLs.
// Use when creating, editing, previewing, or publishing blog posts through the local working-copy flow, especially when the task involves `content/blog`, `npm run blog:*` commands, or `/blog-preview/...` URLs.
| name | blog-authoring |
| description | Use when creating, editing, previewing, or publishing blog posts through the local working-copy flow, especially when the task involves `content/blog`, `npm run blog:*` commands, or `/blog-preview/...` URLs. |
Default editing workflow:
content/blog/.Do not default to editing the remote source-of-truth repository directly unless the user explicitly asks for it.
Before changing content, verify the current state:
git branch --show-current
npm run blog:status
If content/blog is missing, initialize it:
npm run blog:bootstrap
If the user explicitly wants to refresh the working copy from remote state:
npm run blog:sync -- --force
Edit only:
content/blog/posts/*.mdcontent/blog/authors/data.jsoncontent/blog/categories/data.jsonThen run:
npm run dev
Use the local app to review:
/blog/blog/<slug>blogUse the built-in CLI:
npm run blog:publish-branch -- --branch <branch-name>
Defaults:
--branch is omitted, the current git branch name is usedcontent/blog snapshot into the configured remote content repository/blog-preview/...Open the generated preview URL, for example:
/blog-preview/<slug>?branch=<branch>&secret=<secret>
If the preview returns 404, treat that as “access denied or missing branch/slug”. Do not assume the route is public.
content/blog in the current repository as the editing surface.content/blog automatically; only use blog:sync -- --force when the user explicitly wants a refresh.git remote -v first and confirm which remote is safe to push to.src/scripts/compare-sites.js.Load only what you need:
references/commands.md