name: new-post description: Create a new Hugo blog post for zblog. Use when the user asks to create a new blog post or article. Handles slug generation, front matter, and file creation in the correct format.
New Post
Rules
- Post files use
.markdownextension, not.md - Posts live under
content/posts/ - File path:
content/posts/<slug>.markdown(single file, no subdirectory) - Front matter format is YAML (delimited by
---) draft: trueby default unless the user says to publish
Slug Rules
- Lowercase, hyphens only, no special characters
- Derived from the post title (translate Chinese to pinyin or English keywords if needed)
- Keep it concise (≤ 6 words)
Front Matter Template
---
title: "<exact title from user>"
date: <current datetime with timezone, e.g. 2026-03-11T20:00:00+08:00>
draft: true
series:
-
categories:
-
tags:
-
---
Only include series / categories / tags if the user provides them or they
can be inferred from similar posts (see below); otherwise omit those fields.
Check Similar Posts
Before writing the front matter, check whether the post belongs to an existing group (e.g. a recurring series like 派派成长日记). Look at sibling posts to stay consistent:
- series / categories:
grepexisting posts incontent/posts/for related files and reuse the sameseriesandcategoriesvalues verbatim. Example:ls content/posts/ | grep -i <keyword>, then inspect the front matter of the most recent match. - path / slug naming: follow the naming pattern of the latest sibling post
(e.g.
paipai-growth-diary-<N>-<keyword>), not just an ad-hoc slug. - title numbering: if the series uses a counter (e.g.
#15), continue the sequence using the latest post as reference.
Steps
- If the user has not provided a title, ask: "文章标题是什么?" and wait for the answer before proceeding.
- Check similar posts (see above) to infer
series/categories, the slug naming pattern, and any title numbering. - Derive a slug from the title, matching the sibling naming pattern when the post belongs to an existing group.
- Write
content/posts/<slug>.markdownwith the front matter above using thewritetool. - Tell the user the full path of the created file.
- Do not run
hugo new— create the file directly with thewritetool.