| name | Klytos Gutenberg Blocks |
| description | Guide to Gutenberg block markup for Klytos CMS โ CRITICAL for page creation via MCP. All HTML content MUST use Gutenberg block comment delimiters so the visual editor can parse blocks correctly. Use when creating or updating pages with content. |
Klytos CMS โ Gutenberg Block Markup Reference
CRITICAL RULE
When creating or updating pages in Klytos via MCP (klytos_create_page, klytos_update_page), the content_html field MUST use Gutenberg block comment delimiters. Without them, the visual editor (Gutenberg) cannot parse the content back into editable blocks.
WRONG (plain HTML โ editor cannot parse it):
<h2>About Us</h2>
<p>We are a company...</p>
CORRECT (Gutenberg block markup โ editor works perfectly):
<h2 class="wp-block-heading">About Us</h2>
<p>We are a company...</p>
Syntax Rules
- Opening comment:
<!-- wp:blockname --> or <!-- wp:blockname {"attr":"value"} -->
- Closing comment:
<!-- /wp:blockname -->
- Self-closing blocks:
<!-- wp:blockname {"attr":"value"} /-->
- Attributes are a JSON object inside the opening comment
- Nested blocks go between the parent's HTML tags
- Every piece of visible content MUST be wrapped in a block
Essential Text Blocks
Paragraph
<p>Your text here.</p>
Heading
<h2 class="wp-block-heading">H2 Heading</h2>
<h1 class="wp-block-heading">H1 Heading</h1>
Levels: 1, 2, 3, 4, 5, 6. Default is 2.
List
<ul class="wp-block-list">
<li>First item</li>
<li>Second item</li>
</ul>
Ordered list:
<ol class="wp-block-list">
<li>Step one</li>
<li>Step two</li>
</ol>
Media Blocks
Image
<figure class="wp-block-image size-large">
<img src="/assets/images/photo.jpg" alt="Description of the image" />
</figure>
Gallery (3 columns)
<figure class="wp-block-gallery has-nested-images columns-3 is-cropped">
<figure class="wp-block-image size-large">
<img src="/assets/images/photo1.jpg" alt="Photo 1" />
</figure>
<figure class="wp-block-image size-large">
<img src="/assets/images/photo2.jpg" alt="Photo 2" />
</figure>
<figure class="wp-block-image size-large">
<img src="/assets/images/photo3.jpg" alt="Photo 3" />
</figure>
</figure>
Video
<figure class="wp-block-video">
<video controls src="/assets/video/demo.mp4"></video>
<figcaption class="wp-element-caption">Product demo video.</figcaption>
</figure>
Layout Blocks
Columns (2-column)
<div class="wp-block-columns">
<div class="wp-block-column">
<h3 class="wp-block-heading">Left Column</h3>
<p>Content for the left column.</p>
</div>
<div class="wp-block-column">
<h3 class="wp-block-heading">Right Column</h3>
<p>Content for the right column.</p>
</div>
</div>
Group (container with background)
<div class="wp-block-group has-background" style="background-color:#f1f5f9">
<h2 class="wp-block-heading has-text-align-center">Section Title</h2>
<p class="has-text-align-center">Section description goes here.</p>
</div>
Separator
<hr class="wp-block-separator has-alpha-channel-opacity" />
Spacer
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
Interactive Blocks
Buttons
<div class="wp-block-buttons">
<div class="wp-block-button">
<a class="wp-block-button__link wp-element-button" href="/contact/">Get Started</a>
</div>
<div class="wp-block-button is-style-outline">
<a class="wp-block-button__link wp-element-button" href="/demo/">Request Demo</a>
</div>
</div>
Table
<figure class="wp-block-table">
<table>
<thead>
<tr>
<th>Feature</th>
<th>Free</th>
<th>Premium</th>
</tr>
</thead>
<tbody>
<tr>
<td>Pages</td>
<td>Unlimited</td>
<td>Unlimited</td>
</tr>
<tr>
<td>Support</td>
<td>Community</td>
<td>Priority</td>
</tr>
</tbody>
</table>
<figcaption class="wp-element-caption">Feature comparison.</figcaption>
</figure>
Important Notes
- Always wrap every piece of content in a block. Never leave raw HTML outside of block comments.
- Use semantic blocks. Use
wp:heading for headings, wp:paragraph for paragraphs โ not raw <h2> or <p> tags.
- Nest blocks correctly. Columns contain Column blocks. Buttons contain Button blocks. Groups contain any blocks.
- Use
class="wp-block-heading" on all headings. This is required for the editor to recognize them.
- Use
class="wp-block-list" on <ul> and <ol> elements.
- Images should use
class="wp-block-image" on the <figure> wrapper.
- Buttons always need a
wp:buttons parent wrapping wp:button children.
- Self-closing blocks (separator, spacer, embed) end with
/--> instead of having a closing comment.
- For Klytos CMS specifically, images should reference
/assets/images/ paths (the public assets directory).
Quick Example: Simple Landing Page
<h1 class="wp-block-heading">Welcome to Our Site</h1>
<p>Build amazing things with AI and static HTML.</p>
<div class="wp-block-buttons">
<div class="wp-block-button">
<a class="wp-block-button__link wp-element-button" href="/get-started/">Get Started</a>
</div>
</div>
Source Files
- Gutenberg documentation reference format
- Editor:
admin/page-editor.php
For the complete block reference with all block types, style attributes, and embed examples, see the references/complete-blocks.md file.