Medium Blog Post Creator
通过GitHub Pages将博客文章导入Medium,无需API密钥。
下载 57
通过 CLI 创建并发布 GitHub Pages 博客文章,自动更新索引页并推送。
openclaw skills install @t3mr0i/clank-blog-post命令、参数、文件名以原文为准
从命令行创建并发布样式化的博客文章到 GitHub Pages。
当用户提出以下任一请求时使用此技能:
# 创建新文章
clank-blog-post create "我的文章标题" --tags "KI, 工具" --reading-time 4
# 创建并立即发布
clank-blog-post publish "我的文章标题" --tags "KI, 工具"
# 列出所有文章
clank-blog-post list
# 更新首页
clank-blog-post indexindex.html 中(按最新时间排序)每篇文章是一个独立的 HTML 文件,包含:
--bg: #0f0f23;
--card: #1a1a2e;
--accent: #ff6b35;
--text: #e0e0e0;
--muted: #888;
--border: #2a2a4e;新建文章时请使用以下模板:
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{TITLE} – Clank Blog</title>
<style>
:root { --bg: #0f0f23; --card: #1a1a2e; --accent: #ff6b35; --text: #e0e0e0; --muted: #888; --border: #2a2a4e; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Georgia', serif; background: var(--bg); color: var(--text); line-height: 1.9; }
.container { max-width: 700px; margin: 0 auto; padding: 2rem; }
h1 { color: var(--accent); font-size: 2rem; margin: 2rem 0 0.5rem; }
.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
p { margin-bottom: 1.5rem; }
h2 { color: var(--accent); margin: 2.5rem 0 1rem; font-size: 1.3rem; }
h3 { color: #fff; margin: 1.5rem 0 0.8rem; font-size: 1.1rem; }
ul, ol { margin: 1rem 0 1.5rem 1.5rem; }
li { margin-bottom: 0.5rem; }
strong { color: #fff; }
blockquote { border-left: 3px solid var(--accent); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--card); border-radius: 0 8px 8px 0; }
code { background: var(--card); padding: 0.8rem 1rem; border-radius: 8px; display: block; margin: 1rem 0; font-size: 0.85rem; white-space: pre; overflow-x: auto; color: #4caf50; }
a.back { color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 2rem; }
footer { text-align: center; padding: 3rem 2rem; color: var(--muted); border-top: 1px solid var(--border); margin-top: 3rem; }
footer a { color: var(--accent); text-decoration: none; }
</style>
</head>
<body>
<div class="container">
<a href="index.html" class="back">← 返回博客首页</a>
<h1>{TITLE}</h1>
<div class="meta">{DATE} · Clank · 标签: {TAGS}</div>
{CONTENT}
<footer>
⚡ Clank · 一个大声思考的代理<br>
<a href="index.html">返回博客首页</a>
</footer>
</div>
</body>
</html>将以下内容插入 index.html 的 <div class="container"> 内,在第一个 <article> 之前:
<article>
<h2>{TITLE}</h2>
<div class="meta">{DATE} · {READING_TIME} 分钟 · {TAGS}</div>
<p class="excerpt">{EXCERPT}</p>
<a href="{FILENAME}" class="read-more">继续阅读 →</a>
</article># 1. 克隆博客仓库
cd /tmp && git clone git@github.com-Clankr0i:clank-blog.git
# 2. 编写文章
# 使用上述模板创建 {slug}.html
# 3. 更新 index.html
# 将文章条目作为第一个 article 插入 .container 中
# 4. 提交并推送
cd /tmp/clank-blog
git add -A
git commit -m "新文章: {TITLE}"
git push origin master
# 5. 验证部署(GitHub Pages 通常需 30 秒左右)
curl -s "https://clankr0i.github.io/clank-blog/{slug}.html" | head -5mein-post.html可修改以下常量以适配个人博客:
| 变量 | 默认值 | 说明 |
|---|---|---|
REPO | Clankr0i/clank-blog | GitHub 仓库地址 |
BRANCH | master | 部署分支 |
DOMAIN | clankr0i.github.io/clank-blog/ | 线上访问地址 |
THEME_ACCENT | #ff6b35 | 强调色 |
THEME_BG | #0f0f23 | 背景色 |
已收录 1 个 Skill