|
| 1 | +--- |
| 2 | +name: publish |
| 3 | +description: Create content for the Ruby Taiwan Jekyll website — blog posts, events, and community campaigns. Use this skill whenever the user wants to publish a post, announce an event, add a campaign, or mentions creating content for the Ruby Taiwan site. Trigger on phrases like "/publish post", "/publish event", "/publish campaign", or any variation of "add a post/event to the site". Make sure to use this skill even for brief commands like "/publish event RubyConf" or "/publish post announcement". |
| 4 | +--- |
| 5 | + |
| 6 | +# Publish Content for Ruby Taiwan Website |
| 7 | + |
| 8 | +You are helping the user create content for the Ruby Taiwan community website, a Jekyll static site. All generated content must be in Traditional Chinese (Taiwan / zh-TW). |
| 9 | + |
| 10 | +## Usage |
| 11 | + |
| 12 | +``` |
| 13 | +/publish <type> [description] |
| 14 | +``` |
| 15 | + |
| 16 | +- `type`: One of `post`, `event`, or `campaign` |
| 17 | +- `description`: Optional free-text context about what to publish |
| 18 | + |
| 19 | +If the user omits the type, ask which content type they want to create. |
| 20 | + |
| 21 | +## Content Types |
| 22 | + |
| 23 | +### post — Blog Post |
| 24 | + |
| 25 | +File: `_posts/YYYY-MM-DD-slug.md` (slug in lowercase English, hyphen-separated) |
| 26 | + |
| 27 | +Front matter: |
| 28 | +```yaml |
| 29 | +--- |
| 30 | +title: "文章標題" |
| 31 | +date: 'YYYY-MM-DD' |
| 32 | +layout: post |
| 33 | +--- |
| 34 | +``` |
| 35 | + |
| 36 | +Required fields to collect: |
| 37 | +| Field | Prompt | Default | |
| 38 | +|-------|--------|---------| |
| 39 | +| title | 文章標題是什麼? | — | |
| 40 | +| date | 發文日期? | today | |
| 41 | +| body | 文章內容或素材? | — | |
| 42 | + |
| 43 | +Content style guidelines: |
| 44 | +- Friendly, casual community tone — like sharing news with friends |
| 45 | +- Use brackets for event names in titles: `【RubyConf Taiwan】...` |
| 46 | +- Include relevant links (official site, registration, social media) |
| 47 | +- Image format: `` |
| 48 | +- End with a call to follow community platforms (Facebook, Instagram) when appropriate |
| 49 | + |
| 50 | +### event — Event |
| 51 | + |
| 52 | +File: `_events/YYYY-MM-DD-slug.md` |
| 53 | + |
| 54 | +Front matter: |
| 55 | +```yaml |
| 56 | +--- |
| 57 | +title: 活動名稱 |
| 58 | +date: YYYY-MM-DD |
| 59 | +location: "活動地點" |
| 60 | +time: "HH:MM - HH:MM" |
| 61 | +ended: false |
| 62 | +need_apply: false |
| 63 | +event_url: https://registration-link |
| 64 | +--- |
| 65 | +``` |
| 66 | + |
| 67 | +Required fields to collect: |
| 68 | +| Field | Prompt | Default | |
| 69 | +|-------|--------|---------| |
| 70 | +| title | 活動名稱? | — | |
| 71 | +| date | 活動日期? | — | |
| 72 | +| location | 活動地點(地址或場地名稱)? | — | |
| 73 | +| time | 活動時間(起迄)? | — | |
| 74 | +| need_apply | 是否需要報名? | false | |
| 75 | +| event_url | 報名或活動連結? | — | |
| 76 | + |
| 77 | +Notes: |
| 78 | +- `ended` is always `false` for new events |
| 79 | +- Body content after front matter is optional, usually left empty |
| 80 | +- Time uses 24-hour format: `HH:MM - HH:MM` |
| 81 | + |
| 82 | +### campaign — Community Campaign |
| 83 | + |
| 84 | +File: `_data/campaigns.yml` (append to existing array) |
| 85 | + |
| 86 | +Data format: |
| 87 | +```yaml |
| 88 | +- title: "活動名稱" |
| 89 | + id: "lowercase-identifier" |
| 90 | + photo: |
| 91 | + - "image1.jpg" |
| 92 | + desc: > |
| 93 | + 活動介紹 |
| 94 | + links: |
| 95 | + - name: "連結名稱" |
| 96 | + url: "https://url" |
| 97 | +``` |
| 98 | +
|
| 99 | +Required fields to collect: |
| 100 | +| Field | Prompt | Default | |
| 101 | +|-------|--------|---------| |
| 102 | +| title | 社群活動名稱? | — | |
| 103 | +| id | 識別碼(英文小寫)? | derived from title | |
| 104 | +| desc | 簡短介紹? | — | |
| 105 | +| links | 相關連結(名稱 + 網址)? | — | |
| 106 | +| photo | 圖片檔名? | — | |
| 107 | +
|
| 108 | +## Workflow |
| 109 | +
|
| 110 | +1. **Parse arguments** — extract the content type and any information already provided in the description. |
| 111 | +2. **Collect missing fields** — for each required field not yet known, ask the user one question at a time in Traditional Chinese. If the user provided enough context in the description, skip those fields. |
| 112 | +3. **Generate file** — once all required fields are collected, create the file directly. |
| 113 | +4. **Confirm** — tell the user the file path and remind them to preview with `bundle exec jekyll serve`. |
| 114 | + |
| 115 | +If the user provides all necessary information upfront, skip the interview and create the file immediately. The goal is to minimize back-and-forth. |
| 116 | + |
| 117 | +## Edge Cases |
| 118 | + |
| 119 | +- User provides event-like info (location, time) without specifying type → default to `event` |
| 120 | +- User wants both an event and a blog post announcing it → create both files, event first then post |
| 121 | +- Date not provided for a post → default to today |
| 122 | +- Date not provided for an event → must ask, never assume |
0 commit comments