返回顶部
p

publish-to-mdpage发布为网页

Turn any markdown into a shareable web page via md.page. Use when the user asks to "share this", "publish this markdown", "create a shareable link", "make this a web page", "send this as a link", "host this", or wants to turn any markdown content into a URL. Also triggers on "publish a report", "share my notes", "create a page", or any request to make content accessible via a link.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
138
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

publish-to-mdpage

发布到 md.page

通过一次API调用,将任意Markdown内容发布为美观、可分享的网页。无需注册账号、无需API密钥、无需任何配置。

API

POST https://md.page/api/publish

bash
curl -X POST https://md.page/api/publish \
-H Content-Type: application/json \
-d {markdown: # 你好\n\n你的内容在这里}

响应 201 Created:
json
{
url: https://md.page/a8Xk2m,
expires_at: 2026-03-29T12:00:00.000Z
}

错误码原因
400缺少或无效的 markdown 字段,或无效的JSON主体
413
内容超过500KB |

工作流程

  1. 1. 准备Markdown内容:
- 如果用户想要发布现有文件,先使用读取工具读取文件内容,然后发布其内容。发布前,扫描内容中的机密信息(API密钥、令牌、密码、凭证、私钥、.env值)。如果发现任何机密信息,警告用户,并在用户确认前不要发布。 - 如果生成新的Markdown,以 # 标题 开头,以确保页面标题和链接预览正常。生成的内容中绝不包含机密信息或凭证。
  1. 2. 使用带 curl 的Bash工具发送POST请求。
  2. 为安全处理特殊字符(引号、撇号、换行符),使用Python对负载进行JSON编码,然后通过管道传递给curl:

bash
curl -s -X POST https://md.page/api/publish \
-H Content-Type: application/json \
-d $(python3 -c
import json
md = 你的Markdown内容在这里
print(json.dumps({markdown: md}))
)

  1. 4. 解析JSON响应,将 url 返回给用户。告知用户页面将在24小时后过期。
  2. 如果请求失败,对照上表检查错误状态码并告知用户。

格式提示

  • - 第一行的 # 标题 将成为浏览器标签页和社交预览中的页面标题。
  • 代码块、表格、引用、列表、图片和链接均以简洁样式渲染。
  • 自动适配深色模式。
  • 最大内容大小:500KB。
  • URL为私密、不可猜测的6字符ID。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 publish-to-mdpage-1775957581 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 publish-to-mdpage-1775957581 技能

通过命令行安装

skillhub install publish-to-mdpage-1775957581

下载

⬇ 下载 publish-to-mdpage v1.2.0(免费)

文件大小: 2.29 KB | 发布时间: 2026-4-13 11:40

v1.2.0 最新 2026-4-13 11:40
Add secret scanning before publish, remove rate-limit/bot-blocking warnings, add keywords for discoverability

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部