← 返回
未分类 Key

发布文章到nav.wufly.cn

Publish, update, unpublish, or delete articles in this repo through the admin API and publish workflow.
wufly
未分类 community v1.0.0 1 版本 98969.1 Key: 需要
★ 0
Stars
📥 96
下载
💾 0
安装
1
版本
#latest

概述

Publish Article

When To Use

Use this skill when the user wants to publish a new article, update an existing draft, regenerate an article code, unpublish an article, or permanently delete an article in this repo. This is the default workflow for article publishing through openclaw.

Workflow

1. Collect the minimum fields

  • Required for publish: title, categoryLabel, categoryHref, thumb, and either contentHtml or a structured body.
  • If slug is missing, use GET /api/admin/articles/slug.
  • If publishedDate is missing, default to the current Shanghai date.
  • Call admin endpoints with the x-api-key header when using openclaw.
  • The server reads ADMIN_API_KEY for that header and still accepts the normal browser session cookie for the admin console.
  • If author fields are missing, use the fixed defaults already used by the admin console:
  • authorName: 无界
  • authorRole: 管理员
  • authorAvatar: the existing default avatar URL in the admin console.
  • Leave optional fields blank unless the user explicitly wants them.

2. Publish or update

  • Use POST /api/admin/articles with the same JSON body the admin console sends.
  • Reuse the same slug to update an article.
  • Do not edit SQLite files directly unless the task is explicitly about recovery or migration.

3. Verify

  • Use GET /api/admin/articles/{slug} to read back the saved draft or unpublished article.
  • Use the public article URL /view/{code}/{title-slug}/ to confirm the front-end page.
  • If the article was unpublished, confirm the public page returns 404.

4. Manage state

  • Use PATCH /api/admin/articles/{slug} with { "isPublished": false } to unpublish.
  • Use PATCH /api/admin/articles/{slug} with { "isPublished": true } to republish.
  • Use DELETE /api/admin/articles/{slug} for permanent removal.

Rules

  • Treat article code as a 10-character alphanumeric random string; do not invent a different format.
  • Do not fabricate category, cover image, or title content.
  • If a required field is missing, ask for it before publishing.
  • When the user only wants a normal publish, do not change unrelated fields.
  • Prefer the existing admin API and console over direct database edits.
  • For API calls, send x-api-key: and omit browser-session-specific assumptions.

Reference

See references/api_reference.md for the publish payload, default values, and route contract.

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-04-13 23:15 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358 📥 318,440
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,868
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,568