Draft, publish, and package changxian-web posts using the unified article architecture: write Markdown articles with changxian writer-style rules, generate declarative poster.cards in a concise MiniMax-like card language, and publish JSON article records under src/content/articles/*.json for the generic /posts/:slug route.
用于 changxian-web 的写文 + 发文 + 图文卡片发布一体化流程。
推荐模式:先写 Markdown 正文,再生成 declarative poster,再用脚本发布 JSON 文章记录。
references/article-writing-rules.mdreferences/poster-style-minimax.mdreferences/publish-checklist.mdpython3 $CODEX_HOME/skills/changxian-blog-publisher/scripts/publish_post.py \
--workspace /path/to/changxian-web \
--slug <post-slug> \
--id <post-id> \
--title "<文章标题>" \
--desc "<文章摘要>" \
--date YYYY-MM-DD \
--category "<分类>" \
--channel "<频道>" \
--tags "标签1,标签2,标签3" \
--read "10 分钟" \
--content-file /path/to/article.md \
--sources-file /path/to/sources.md \
--cards-source /path/to/cards \
--card-layout auto
如果卡片要强自定义,优先提供:
--poster-json /path/to/poster.json
如果只需要起草文章,不要急着运行发布脚本;先产出:
article.mdsources.mdposter.json当前 changxian-web 使用统一文章架构:
src/content/articles/*.jsoncontent 字段中,使用 Markdown'/posts/:slug'src/pages/posts/ArticlePostPage.jsxposter.cards不要再生成单篇 JSX 页面,不要新增独立路由,也不要使用 legacy renderer bridge。
写文时遵守两条总原则:
正文默认应满足:
3 个判断、5 个变化、路线图、对比拆解 这类结构,但不要为了凑数字硬切卡片不要机械切正文,要先做传播版重组:
默认优先采用 MiniMax 那类信息型卡片语言:
cover-homelayersmetricstimeline / hot-timelinechecklist 或 pointsctascripts/publish_post.py 会完成:
src/content/articles/<slug>.jsonid/slug/title/desc/date/category/channel/tags/read/presetsummary/content/sourcesposter / actionspublic/assets/posts/<slug>/poster 模板与 actions 模板src/pages/Generator.jsx preset发布后必须执行:
npm run build
并检查:
/articles 能看到新文章/posts/<slug> 能正常访问poster.cards 能正常渲染<hr />sources 字段提供文章 JSON 至少包含:
idslugtitledescdatecategorychanneltagsreadpresetsummarycontent--content-file /path/to/article.md--sources-file /path/to/sources.md--summary-items "结论1|结论2|结论3"--cards-source /path/to/cards--poster-json /path/to/poster.json--poster-template-out /path/to/generated-poster.json--actions-template-out /path/to/actions-template.json--card-layout auto|image|compare|timeline|concept|metrics|layers|checklist--focus-terms "术语1,术语2,术语3"--keep-existing-poster--keep-existing-actions--brand-name "尝鲜AI"--brand-subtitle "科技日报"--follow-term "关注公众号:尝鲜AI"--poster-badge "专题特辑"--card-footer "尝鲜AI · 科技日报"--logo-url "/logo.png"--cover-decoration-text "CARD"--show-card-no--no-show-card-noreferences/article-writing-rules.mdreferences/poster-style-minimax.mdreferences/publish-checklist.mdreferences/article-json-template.jsonreferences/poster-template.jsonreferences/actions-template.jsonscripts/publish_post.pyscripts/register_post.py