| name | converting-to-wordpress-swell |
| description | Convert HTML, Markdown, or plain text to WordPress Gutenberg block format for SWELL theme. Use PROACTIVELY when converting content to WordPress, SWELL theme formatting, Gutenberg blocks, WordPress記事変換, SWELL形式, ブログ記事変換, or working with wp:paragraph, wp:heading, wp:list, swl-marker. Examples: <example>Context: User has markdown or HTML to convert user: 'Convert this article to WordPress format' assistant: 'I will use converting-to-wordpress-swell skill' <commentary>Triggered by WordPress conversion request</commentary></example> |
WordPress SWELL Theme Format Converter
Convert HTML, Markdown, or plain text content to WordPress Gutenberg block format optimized for the SWELL theme.
When to Use This Skill
- Converting Markdown articles to WordPress format
- Converting plain HTML to Gutenberg blocks
- Formatting blog posts for SWELL theme
- Adding SWELL-specific styling (icon boxes, markers)
- Preparing content for WordPress import
Block Format Reference
Basic Structure
All WordPress Gutenberg blocks follow this pattern:
<element class="wp-block-*">Content</element>
Paragraph
<p>Your paragraph text here.</p>
With SWELL paragraph style (icon):
<p class="is-style-big_icon_memo">Note content here.</p>
Headings
H2 (default):
<h2 class="wp-block-heading">Heading Text</h2>
H3:
<h3 class="wp-block-heading">Subheading Text</h3>
H4:
<h4 class="wp-block-heading">Sub-subheading Text</h4>
Lists
Unordered List:
<ul class="wp-block-list">
<li>Item 1</li>
<li>Item 2</li>
</ul>
Ordered List:
<ol class="wp-block-list">
<li>First item</li>
<li>Second item</li>
</ol>
Tables
<figure class="wp-block-table is-style-simple"><table><tbody><tr><td><strong>Header 1</strong></td><td><strong>Header 2</strong></td></tr><tr><td>Cell 1</td><td>Cell 2</td></tr></tbody></table></figure>
Code Blocks (SWELL HCB - Highlighting Code Block)
<div class="hcb_wrap"><pre class="prism undefined-numbers lang-js" data-lang="JavaScript"><code>const example = "code here";</code></pre></div>
Common language types:
js / JavaScript
python / Python
bash / Bash
html / HTML
css / CSS
json / JSON
ts / TypeScript
SWELL-Specific Features
Icon Boxes (Group + List)
Wrap lists in a group block with SWELL icon styles:
Point/要点 (bullet point icon):
重要: 長い説明を持つリストアイテムは個別リストに分割し、間に空段落を挿入して視覚的に区切る:
<div class="wp-block-group is-style-big_icon_point">
<ul class="wp-block-list">
<li><strong>ポイント1のタイトル</strong><br>ポイント1の詳細説明文。</li>
</ul>
<p></p>
<ul class="wp-block-list">
<li><strong>ポイント2のタイトル</strong><br>ポイント2の詳細説明文。</li>
</ul>
<p></p>
<ul class="wp-block-list">
<li><strong>ポイント3のタイトル</strong><br>ポイント3の詳細説明文。</li>
</ul>
</div>
短いシンプルなリストの場合は従来通り1つのリストにまとめてOK:
<div class="wp-block-group is-style-big_icon_point">
<ul class="wp-block-list">
<li>Key point 1</li>
<li>Key point 2</li>
</ul>
</div>
Good/メリット (checkmark icon):
<div class="wp-block-group is-style-big_icon_good">
...
</div>
Hatena/疑問 (question mark icon):
<p class="is-style-big_icon_hatena">Question or consideration text.</p>
Memo/メモ (note icon):
<p class="is-style-big_icon_memo">Additional note or memo.</p>
Available Icon Styles
| Style Class | Use Case | Icon |
|---|
is-style-big_icon_point | Key points, summary | Bullet |
is-style-big_icon_good | Benefits, pros, recommendations | Checkmark |
is-style-big_icon_hatena | Questions, considerations | Question mark |
is-style-big_icon_memo | Notes, additional info | Memo |
Text Markers (Inline Highlighting)
IMPORTANT: Use all 4 marker colors strategically based on meaning:
Blue marker - 重要ポイント・キーコンセプト:
<span class="swl-marker mark_blue">行動追跡を防ぎやすく</span>
Green marker - ポジティブ・推奨・メリット:
<span class="swl-marker mark_green">返金保証のあるサービス</span>
Yellow marker - 注意・警告・考慮事項:
<span class="swl-marker mark_yellow">一部の国やサービスでは規制や制限</span>
Orange marker - 禁止事項・強い警告:
<span class="swl-marker mark_orange">無料サービスには注意が必要</span>
Inline Formatting
Bold:
<strong>bold text</strong>
Links (通常):
<a href="https://example.com" target="_blank" rel="noreferrer noopener">Link text</a>
Links (スポンサード/Dofollow用 - rel属性とtarget属性を削除):
<a href="https://example.com">Link text</a>
Line break:
<br>
PR表記(スポンサード記事用)
記事の最初に配置:
<p class="is-style-alert">※本記事はPRを含みます。</p>
Images with Caption (引用元表記)
画像には引用元をキャプションとして追加:
<figure class="wp-block-image size-large"><img src="images/image.jpg" alt=""/><figcaption class="wp-element-caption">引用元:<a href="https://www.pexels.com/ja-jp/photo/123456/">https://www.pexels.com/ja-jp/photo/123456/</a></figcaption></figure>
Reusable Blocks
Reference a reusable block by ID:
Conversion Rules
From Markdown
| Markdown | WordPress SWELL |
|---|
# Heading | <!-- wp:heading --> (H2 by default) |
## Heading | <!-- wp:heading --> (H2) |
### Heading | <!-- wp:heading {"level":3} --> (H3) |
**bold** | <strong>bold</strong> |
- item | <!-- wp:list --> + <!-- wp:list-item --> |
1. item | <!-- wp:list {"ordered":true} --> |
`code` | Use HCB code block for blocks |
[text](url) | <a href="url">text</a> |
From Plain HTML
- Wrap each
<p> in <!-- wp:paragraph --> blocks
- Convert
<h2>, <h3> to heading blocks with appropriate level
- Convert
<ul>, <ol> to list blocks with nested list-items
- Convert
<table> to table blocks with figure wrapper
- Convert
<pre><code> to SWELL HCB code blocks
Conversion Workflow
- Analyze source content - Identify structure (headings, lists, code, tables)
- Convert basic blocks - Transform to Gutenberg block format
- Add SWELL enhancements - Apply icon boxes and markers where appropriate
- Validate output - Ensure all blocks are properly closed
Best Practices
When to Use Icon Boxes
is-style-big_icon_point - For key takeaways, summaries, "what you'll learn"
is-style-big_icon_good - For benefits, pros, recommended actions
is-style-big_icon_hatena - For FAQ-style content, considerations, "did you know"
is-style-big_icon_memo - For supplementary notes, tips, warnings
When to Use Markers (CRITICAL: Use all 4 colors)
mark_blue - 重要ポイント、キーコンセプト(例:「暗号化される」「追跡を防ぐ」)
mark_green - ポジティブな内容、推奨事項、メリット(例:「返金保証」「速度低下を最小限」)
mark_yellow - 注意事項、警告、考慮点(例:「規制や制限」「有名だから安いから」)
mark_orange - 禁止・強い警告(例:「無料サービスには注意」「アクセスを禁止」)
Goal: 各セクションに1-2個のマーカーを配置し、4色をバランスよく使用
Content Structure Tips
- 導入部分(リード文)は必須 - PR表記の後、最初のH2の前に3-5段落の導入文を配置
- 読者の課題・疑問を提示
- 記事で学べることの概要
- 最後に商品/サービスへのリンクを自然に配置
- Use H2 for main sections, H3 for subsections
- Include a summary box early (icon_point)
- Use tables for comparison data
- End with a summary/conclusion section
- アイコンボックスの前には必ず導入文を追加(例:「以下のような特徴も兼ね備えています」)
Bold(<strong>)の積極的な使用
以下の要素には必ず太字を適用:
- 専門用語・キーワード:「VPN」「ジオブロック」
- 数字・価格:「月540円から」「世界178ヵ所」
- 重要なフレーズ:「通常より通信速度が低下」
- 記事内の要点:「特に注意すべき3つのポイント」
AI Assistant Instructions
When converting content to WordPress SWELL format:
- Always use proper block structure - Every element must have opening and closing block comments
- Preserve semantic meaning - Match source structure to appropriate blocks
- Apply SWELL styles appropriately - Use icon boxes for lists that deserve emphasis
- Use all 4 marker colors strategically - blue/green/yellow/orange を意味に応じて使い分け
- Maintain readability - Add blank lines between blocks for easier editing
- Escape special characters - Use
" for quotes in code blocks
- 導入文を追加 - PR表記の後・H2の前、アイコンボックスの前など
- 太字を積極的に使用 - キーワード、数字、重要フレーズに
<strong>
- 長いリストアイテムは分割 - 個別リスト+空段落で視覚的に区切る
Output Format
- Output complete, valid WordPress HTML
- Include all block comments
- Format code blocks with appropriate language hints
- Preserve original content meaning while enhancing presentation
- 画像には引用元キャプションを追加
Sponsored/PR記事の場合
- PR表記を記事冒頭に追加(
is-style-alert)
- クライアントリンクはdofollow(
rel属性を削除)
target="_blank"も削除可
Never
- Skip closing block comments
- Mix Markdown and WordPress block syntax
- Use only
mark_blue (4色をバランスよく使う)
- Apply icon boxes to every list
- Remove meaningful content during conversion
- アイコンボックスを導入文なしで唐突に配置
- 重要なキーワードや数字を太字にしない