Juejin Smart Publishing
Platform Entry
Formatting Rules
Article Guidelines
| Item |
Rule |
| Editor |
Markdown (full GFM support) |
| Title |
15-35 characters is optimal, ≤50 characters, include core keywords |
| Body |
1,500-5,000 characters (in-depth technical articles) |
| Code Block |
Must specify language identifier (```python) |
| Images |
Drag/drop/URL/clipboard, ≥800px recommended |
| Tables |
GFM table syntax |
| Divider |
--- Separate major sections |
| Table of Contents |
Automatically generated for long articles |
Category (1 required)
Backend / Frontend / Android / iOS / Artificial Intelligence / Development Tools / Code Life / Reading
Tags
| Item |
Rule |
| Quantity |
1-5 (2-4 recommended) |
| Source |
Search existing or enter a new tag and press Enter |
| Strategy |
1-2 popular tags (traffic) + 1-2 precise tags (matching) |
Cover & Summary
| Item |
Rule |
| Cover |
Optional, widescreen JPG/PNG/GIF ≤5MB recommended |
| Summary |
50-150 characters; if not filled, the first N characters of the body are used |
| Summary Strategy |
Include keywords, highlight the article's value |
Content Adaptation Template
Standard structure for technical articles:
# {标题:动词开头或数字开头}
> {一句话摘要/导言}
## 背景 / 为什么
{痛点描述,1-2段}
## 方案 / 怎么做
{核心内容,代码+图+表}
### Step 1: ...
### Step 2: ...
## 效果 / 结果
{数据对比,before/after}
## 总结
{关键收获,1-3个要点}
---
**参考链接**:
- [link1](url)
- [link2](url)
Title Formulas:
- Number-based: "5 Python Tips That Let You Write Elegant Code"
- Hands-on: "Building an AI Agent System from 0 to 1 — A Complete Guide"
- Question-based: "Why Is Your SQL Query So Slow?"
- Experience-based: "After 3 Months of Pitfalls, I Summarized This CI/CD Solution"
Publishing Process
Playwright Automation
1. 打开 juejin.cn/editor/drafts/new(检查登录态)
2. 填写标题 → input[placeholder*="标题"]
3. 在 Markdown 编辑区写入正文
4. 点击「发布」按钮打开设置面板
5. 选择分类(必选)
6. 搜索+添加标签(1-5个)
7. 上传封面(可选)
8. 填写摘要(可选)
9. 点击「确认并发布」或「保存草稿」
API Channel (requires authentication Token)
# 保存草稿
POST /content_api/v1/article/draft/create
# Body: { title, markdown_content, category_id, tag_ids[], cover_image }
# 发布文章
POST /content_api/v1/article/publish
# Body: { draft_id }
# 上传图片
POST /content_api/v1/upload_pic
Script Usage
# Markdown 文件发布(草稿模式)
python scripts/publish.py \
--title "文章标题" \
--content-file article.md \
--category "人工智能" \
--tags "AI,Agent,OpenClaw" \
--mode draft
# 带封面和摘要
python scripts/publish.py \
--title "标题" \
--content-file article.md \
--category "前端" \
--tags "React,TypeScript" \
--cover cover.png \
--abstract "50-150字摘要" \
--mode draft
# API模式(需cookie-file)
python scripts/publish.py \
--title "标题" \
--content-file article.md \
--category "后端" \
--tags "Python,FastAPI" \
--mode draft \
--api --cookie-file cookies.json
UI Selector Reference (Vue.js SPA, class names contain hash)
| Element |
Locator Strategy |
Description |
| Title Input |
input[placeholder*="标题"] |
Title field |
| Editing Area |
[class*="editor"] [contenteditable] / .CodeMirror |
Markdown editor |
| Preview Area |
[class*="preview"] |
Right-side live preview |
| Publish Button |
button:has-text("发布") |
Opens the publish panel |
| Category Dropdown |
[class*="category"] |
Category selection |
| Tag Input |
[class*="tag"] input |
Tag search |
| Cover Upload |
[class*="cover"] input[type="file"] |
Cover image |
| Summary Input |
[class*="abstract"] textarea |
Summary |
| Confirm publish |
button:has-text("确认并发布") |
Final publish |
| Save draft |
button:has-text("保存草稿") / Auto-save |
Draft |
Note: The Juejin editor has an auto-save draft feature; content is saved a few seconds after input.
Markdown Shortcuts
| Shortcut |
Function |
| Ctrl/Cmd + B |
Bold |
| Ctrl/Cmd + H |
Heading |
| Ctrl/Cmd + K |
Link |
| Ctrl/Cmd + Shift + C |
Code block |
| Ctrl/Cmd + Shift + I |
Image |
| Ctrl/Cmd + Z |
Undo |
Publishing Time Suggestions
| Time slot |
Recommendation |
Description |
| 8:00-9:00 |
⭐⭐⭐ |
Morning commute reading |
| 12:00-13:00 |
⭐⭐⭐⭐ |
Lunch break learning |
| 20:00-22:00 |
⭐⭐⭐⭐⭐ |
Prime time for evening in-depth reading |
| Weekend |
⭐⭐⭐ |
Long-form articles suit weekends |
Error Handling
| Error |
Handling |
| Login expired |
Prompt manual login,--headless false |
| Category not selected |
Automatically select "Backend" (default) |
| Tag search no results |
Press Enter after input to create a new tag |
| Image upload failed |
Retry 3 times, fall back to URL reference |
| Markdown rendering error |
Check syntax, remove unsupported extensions |
| Publishing frequency limit |
Recommended ≤3 articles per day, interval ≥30 minutes |
SEO Optimization Key Points
- Title contains core keywords (the first 15 characters are most important)
- The first 100 characters of the body contain keywords
- Tag selection combines popular + precise
- Summary contains core keywords
- Internally link to your other articles
- Participate in official activities to increase exposure weight
Pre-publish Checklist
- Title 15-35 characters, contains keywords
- Category selected (required)
- 2-4 tags, popular + precise
- All code blocks have language identifiers
- Images clear ≥800px
- No typos/format errors in the body
- Summary 50-150 characters (auto-truncated if left blank)
- Non-copied content, declare originality
File Structure
juejin-smart-publish/
├── SKILL.md
├── scripts/
│ └── publish.py # Playwright + API 双通道发布
├── references/
│ └── api-spec.md # 掘金 API 文档
└── templates/
├── tech-tutorial.md # 技术教程模板
├── project-showcase.md # 开源项目展示模板
└── experience-share.md # 经验分享模板