create-blog-post
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate Blog Post on 聆.tw
在聆.tw创建博文
This skill guides the full workflow of creating a new tech blog post on 聆.tw (琳聽智者漫談), from repo setup to PR submission.
本技能指导在**聆.tw(琳聽智者漫談)**上创建新技术博文的完整工作流,从仓库设置到PR提交。
Prerequisites
前置要求
- CLI available
git - CLI authenticated with GitHub
gh - Write access to
jim60105/ai-talks-content
- 可使用 CLI
git - CLI已通过GitHub认证
gh - 拥有 的写入权限
jim60105/ai-talks-content
Workflow
工作流
Step 1: Clone the Repository
步骤1:克隆仓库
If the blog repo is not yet cloned:
bash
git clone --recurse-submodules https://github.com/jim60105/blog.git
cd blogIf already cloned but submodules are missing:
bash
git submodule update --init --recursiveIf already cloned and submodules exist, just ensure they're up to date:
bash
git pull origin master如果尚未克隆博客仓库:
bash
git clone --recurse-submodules https://github.com/jim60105/blog.git
cd blog如果已克隆但缺少子模块:
bash
git submodule update --init --recursive如果已克隆且子模块存在,只需确保其为最新版本:
bash
git pull origin masterStep 2: Prepare the Submodule
步骤2:准备子模块
Enter the content submodule and ensure it's on the latest :
masterbash
cd 聆.tw/content
git checkout master
git pull origin master
cd ../..进入内容子模块并确保其处于最新的 分支:
masterbash
cd 聆.tw/content
git checkout master
git pull origin master
cd ../..Step 3: Switch to 聆.tw Mode
步骤3:切换至聆.tw模式
From the project root ():
blog/bash
./switch-site.sh 聆.twThis creates symlinks for , , , and pointing to .
config.tomlcontent/static/wrangler.jsonc聆.tw/从项目根目录()执行:
blog/bash
./switch-site.sh 聆.tw此操作会为 、、 和 创建指向 的符号链接。
config.tomlcontent/static/wrangler.jsonc聆.tw/Step 4: Choose Section and Prepare File
步骤4:选择栏目并准备文件
List available content sections:
bash
ls -d 聆.tw/content/*/Choose the section most related to the topic. If none fits well, use .
Uncategorized列出可用的内容栏目:
bash
ls -d 聆.tw/content/*/选择与主题最相关的栏目。如果没有合适的栏目,请使用 。
UncategorizedStep 5: Create the Post File
步骤5:创建博文文件
Create a markdown file with a slugified filename (lowercase, hyphens, English, descriptive):
bash
touch 聆.tw/content/<Section>/my-descriptive-slug.mdNaming convention: use lowercase English words separated by hyphens. The slug should describe the post content concisely.
创建一个文件名经过slug化的Markdown文件(小写、连字符分隔、英文、描述性):
bash
touch 聆.tw/content/<Section>/my-descriptive-slug.md命名规范:使用小写英文单词,以连字符分隔。Slug应简洁描述博文内容。
Step 6: Write Front Matter
步骤6:编写前置元数据(Front Matter)
Read at the project root for the latest front matter specification. The required format:
AGENTS.mdtoml
+++
title = "文章標題(正體中文)"
description = "SEO 友善的文章描述,包含所有重要關鍵字(正體中文)"
date = "YYYY-MM-DDTHH:MM:SSZ"
updated = "YYYY-MM-DDTHH:MM:SSZ"
draft = false
[taxonomies]
tags = ["Tag1", "Tag2"]
providers = [ "Felo Search" ]
[extra]
withAI = "<https://the.ai.resource/used>"
+++Rules:
- : Concise, SEO-friendly, Traditional Chinese
title - : Contains all keywords, compelling for search results
description - : ISO 8601 UTC format, use current timestamp
date - : ISO 8601 UTC format, use current timestamp
updated - : Relevant tags in the format used by existing posts
tags - : The provider(s) of AI assistance used in writing the article, if any
providers - : Brief note about AI assistance or any urls to AI resources used. This is optional but recommended for transparency.
withAI - NEVER fabricate an field — only the user can generate this
iscn
阅读项目根目录下的 获取最新的前置元数据规范。必填格式如下:
AGENTS.mdtoml
+++
title = "文章標題(正體中文)"
description = "SEO 友善的文章描述,包含所有重要關鍵字(正體中文)"
date = "YYYY-MM-DDTHH:MM:SSZ"
updated = "YYYY-MM-DDTHH:MM:SSZ"
draft = false
[taxonomies]
tags = ["Tag1", "Tag2"]
providers = [ "Felo Search" ]
[extra]
withAI = "<https://the.ai.resource/used>"
+++规则:
- :简洁、SEO友好的繁体中文标题
title - :包含所有关键词,对搜索结果有吸引力
description - :ISO 8601 UTC格式,使用当前时间戳
date - :ISO 8601 UTC格式,使用当前时间戳
updated - :采用现有博文使用的格式添加相关标签
tags - :撰写文章时使用的AI辅助提供商(如有)
providers - :关于AI辅助的简要说明或使用的AI资源链接。此为可选字段,但建议添加以保证透明度。
withAI - 切勿伪造 字段 — 仅用户可生成此字段
iscn
Step 7: Write the Blog Post Content
步骤7:撰写博文内容
Read at the project root for full editorial guidelines. For quick reference, see references/writing-guidelines.md.
.github/instructions/quill-sage.instructions.mdKey rules:
- Write in Traditional Chinese (zh-TW) with full-width punctuation
- Add a space between Chinese characters and alphanumeric characters
- Use inverted pyramid structure: core conclusion first, evidence second
- Avoid bullet lists unless explicitly requested; prefer natural paragraphs
- Use and
##subheadings to organize### - Address reader as 「讀者」「大家」「各位」 or 「你」, never 「您」
- Refer to the author as 「我」, never 「我們」
- Opening paragraph states core conclusion and scope
- Closing paragraph must not use slogan-style endings
阅读项目根目录下的 获取完整编辑指南。快速参考可查看 references/writing-guidelines.md。
.github/instructions/quill-sage.instructions.md核心规则:
- 使用**繁体中文(zh-TW)**并搭配全角标点
- 中文字符与字母数字字符之间添加空格
- 使用倒金字塔结构:先给出核心结论,再提供证据
- 除非明确要求,否则避免使用项目符号列表;优先使用自然段落
- 使用 和
##子标题进行内容组织### - 称呼读者为「讀者」「大家」「各位」或「你」,切勿使用「您」
- 指代作者为「我」,切勿使用「我們」
- 开篇段落需说明核心结论和内容范围
- 结尾段落不得使用口号式结尾
Step 8: Add Formatting and Color Shortcodes
步骤8:添加格式和颜色短代码
Review the article and enhance with:
- Bold () for emphasis keywords
**text** - Italic () where appropriate
*text* - Color shortcodes for pros/cons:
- Green (positive): or
{{ cg(body="positive text") }}{% cg() %}block text{% end %} - Red (negative): or
{{ cr(body="negative text") }}{% cr() %}block text{% end %}
- Green (positive):
审阅文章并通过以下方式增强内容:
- 粗体()用于强调关键词
**text** - 斜体()用于合适的场景
*text* - 用于优缺点的颜色短代码:
- 绿色(正面):或
{{ cg(body="positive text") }}{% cg() %}block text{% end %} - 红色(负面):或
{{ cr(body="negative text") }}{% cr() %}block text{% end %}
- 绿色(正面):
Step 9: Add Chat Shortcodes
步骤9:添加对话短代码
Use chat shortcodes to create conversational content that makes the article vivid:
markdown
{% chat(speaker="yuna") %}
Question or statement from Yuna
{% end %}
{% chat(speaker="jim") %}
Response from Jim (author, displayed as 琳, aligned right)
{% end %}Available speakers: , , , , , (author, right-aligned), , or any custom name. Default/ gets a generic user avatar.
chatgptclaudegeminicopilotfelojimyorukauserDesign conversations that naturally introduce the topic, ask clarifying questions, or surface interesting angles. The chat format should add value, not just decorate.
使用对话短代码创建生动的对话式内容:
markdown
{% chat(speaker="yuna") %}
Question or statement from Yuna
{% end %}
{% chat(speaker="jim") %}
Response from Jim (author, displayed as 琳, aligned right)
{% end %}可用发言人:、、、、、(作者,右对齐)、,或任何自定义名称。默认/ 将使用通用用户头像。
chatgptclaudegeminicopilotfelojimyorukauser设计的对话应自然引入主题、提出澄清问题或呈现有趣的视角。对话格式应增加内容价值,而非仅作为装饰。
Step 10: SEO Review — Rewrite Title and Description
步骤10:SEO审阅 — 重写标题和描述
After completing the content, re-evaluate:
- Title: Rewrite for SEO. Include the primary keyword near the front. Keep it concise but descriptive. Traditional Chinese.
- Description: Rewrite to include all important keywords from the article. This text appears in search results — make it compelling and informative. ~150-160 characters ideal.
完成内容后,重新评估:
- 标题:为SEO重写标题。将核心关键词放在靠前位置。保持简洁且具有描述性。使用繁体中文。
- 描述:重写以包含文章中的所有重要关键词。此文本将出现在搜索结果中 — 使其具有吸引力且信息丰富。理想长度为150-160字符。
Step 11: Rename File if Title Changed
步骤11:若标题变更则重命名文件
If the title was significantly revised, rename the file to match:
bash
mv 聆.tw/content/<Section>/old-slug.md 聆.tw/content/<Section>/new-better-slug.mdThe slug should reflect the final title content in English.
若标题进行了大幅修改,重命名文件以匹配:
bash
mv 聆.tw/content/<Section>/old-slug.md 聆.tw/content/<Section>/new-better-slug.mdSlug应使用英文反映最终标题的内容。
Step 12: Create Branch, Commit, and PR
步骤12:创建分支、提交并创建PR
All git operations happen inside the submodule ():
聆.tw/content/bash
cd 聆.tw/content
git checkout -b post/<slug-name>
git add <Section>/new-post-file.md
git commit --signoff --author="GitHub Copilot <bot@ChenJ.im>" -m "feat: add post <descriptive-title>
Add new blog post about <topic summary>.
Co-authored-by: GitHub Copilot <bot@ChenJ.im>"
git push origin post/<slug-name>Then create the PR targeting on :
masterjim60105/ai-talks-contentbash
gh pr create \
--repo jim60105/ai-talks-content \
--base master \
--head post/<slug-name> \
--title "feat: add post <descriptive-title>" \
--body "Add new blog post: <title>
<brief description of content>
---
Written with AI assistance."所有git操作均在子模块内部()执行:
聆.tw/content/bash
cd 聆.tw/content
git checkout -b post/<slug-name>
git add <Section>/new-post-file.md
git commit --signoff --author="GitHub Copilot <bot@ChenJ.im>" -m "feat: add post <descriptive-title>
Add new blog post about <topic summary>.
Co-authored-by: GitHub Copilot <bot@ChenJ.im>"
git push origin post/<slug-name>然后创建针对 仓库 分支的PR:
jim60105/ai-talks-contentmasterbash
gh pr create \
--repo jim60105/ai-talks-content \
--base master \
--head post/<slug-name> \
--title "feat: add post <descriptive-title>" \
--body "Add new blog post: <title>
<brief description of content>
---
Written with AI assistance."Step 13: Request Review
步骤13:请求审阅
bash
gh pr edit --repo jim60105/ai-talks-content <PR_NUMBER> --add-reviewer jim60105bash
gh pr edit --repo jim60105/ai-talks-content <PR_NUMBER> --add-reviewer jim60105Terminology Mappings
术语映射
When writing content, apply these Traditional Chinese mappings: create = 建立, object = 物件, queue = 佇列, stack = 堆疊, information = 資訊, code = 程式碼, running = 執行, library = 函式庫, building = 建構, package = 套件, video = 影片, class = 類別, function = 函式, memory = 記憶體, document = 文件, example = 範例, tutorial = 指南.
撰写内容时,请使用以下繁体中文映射:create = 建立, object = 物件, queue = 佇列, stack = 堆疊, information = 資訊, code = 程式碼, running = 執行, library = 函式庫, building = 建構, package = 套件, video = 影片, class = 類別, function = 函式, memory = 記憶體, document = 文件, example = 範例, tutorial = 指南.