name: "content-publisher-pro" version: "1.1.0" title: "Content Publisher Pro" description: "一鍵將文章釋出到 GitHub Pages 部落格和 Dev.to 開發者社群,支援內容差異化、SEO最佳化、釋出前去重檢查。適合技術博主和內容運營者。" author: "WDSEGA" type: "workflow" category: "productivity" tags: ["content", "publishing", "blog", "devto", "github-pages", "automation", "seo"] difficulty: "intermediate" price: "19.99" license: "MIT"
一套內容多平臺釋出工具,幫助技術博主將 Markdown 文章快速釋出到 GitHub Pages 部落格和 Dev.to 開發者社群,同時提供 SEO 最佳化和釋出前去重檢查。
check_duplicate 方法可手動呼叫檢查7w4.net提供免費和付費技能下載。
複製 config.yaml.example 為 config.yaml,填入你的 API 金鑰:
github:
token: "ghp_xxxxxxxxxxxx" # GitHub Personal Access Token
repo: "username.github.io" # 部落格倉庫名 (格式: 使用者名稱/倉庫名)
devto:
api_key: "xxxxxxxxxx" # Dev.to API Key
獲取 API 金鑰: - GitHub Token: https://github.com/settings/tokens - Dev.to API Key: https://dev.to/settings/account
pip install -r requirements.txt
python publish.py --article ./article.md
python publish.py --article ./article.md --dry-run
# 僅釋出到部落格
python publish.py --article ./article.md --platforms blog
# 僅釋出到 Dev.to
python publish.py --article ./article.md --platforms devto
# 同時釋出到兩個平臺
python publish.py --article ./article.md --platforms all
python publish.py --config /path/to/config.yaml --article ./article.md
python publish.py [選項]
必需引數:
--article, -a 文章檔案路徑
可選引數:
--config, -c 配置檔案路徑 (預設: config.yaml)
--platforms, -p 釋出平臺: all / blog / devto (預設: all)
--mode, -m 釋出模式: full / summary / abstract / auto (預設: auto)
--dry-run, -d 預覽模式,不實際釋出
--verbose, -v 詳細輸出
建立 Markdown 檔案,包含 YAML front matter:
---
title: "文章標題"
date: 2026-05-23
tags: ["技術", "AI", "教程"]
cover_image: "./assets/cover.jpg"
---
文章正文內容...
支援的 front matter 欄位:
| 欄位 | 必需 | 說明 |
|---|---|---|
title |
是 | 文章標題 |
date |
否 | 釋出日期(預設為當前日期) |
tags |
否 | 標籤列表 |
cover_image |
否 | 封面圖片路徑 |
excerpt |
否 | 自定義摘要(不填則自動提取前 200 字) |
content-publisher/
├── SKILL.md # 技能描述檔案
├── README.md # 使用文件
├── LICENSE # MIT 許可協議
├── publish.py # 主程式入口
├── config.yaml.example # 配置檔案示例
├── requirements.txt # Python 依賴
├── utils/
│ ├── __init__.py
│ ├── github_publisher.py # GitHub Pages 釋出模組
│ ├── devto_publisher.py # Dev.to 釋出模組
│ ├── content_processor.py # 內容解析與差異化處理
│ └── seo_optimizer.py # SEO 最佳化模組
├── templates/
│ ├── blog_template.md # 部落格文章模板
│ └── devto_template.md # Dev.to 文章模板
└── examples/
├── sample-article.md # 示例文章
└── sample-config.yaml # 示例配置
編輯 templates/ 目錄下的模板檔案,自定義各平臺釋出格式。
使用系統定時任務(cron):
# 每天上午 9 點自動釋出
0 9 * * * cd /path/to/content && python publish.py --article ./today.md
# 釋出目錄下所有 Markdown 文章
for file in ./articles/*.md; do
python publish.py --article "$file"
done
config.yaml 提交到公共倉庫(已在 .gitignore 中忽略)--verbose 檢視詳細錯誤資訊--dry-run 預覽釋出內容MIT License - 詳見 LICENSE 檔案
整體質量較好,功能實用且文件詳細,SEO 最佳化和內容差異化等特色功能很有價值。模組化設計清晰,示例充足便於理解使用。主要不足是配置稍顯複雜,中文處理能力有限,且文件中有小部分資訊與實際檔案不一致。適合有技術背景的內容創作者使用。