Page Type: Article
Articles use Markdown for content. Ideal for blog posts, SEO content, tutorials, and long-form writing.
Content Structure
Articles store content in the markdown_content field:
curl -X POST "https://api.pagegun.com/pages" \
-H "Authorization: Bearer $PAGEGUN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page_name": "Getting Started with PageGun",
"slug": "getting-started-with-pagegun",
"subroute": "blog",
"type": "article",
"project_id": "your_project_id",
"description": "Learn how to build your first site with PageGun in under 5 minutes.",
"og_image_url": "https://example.com/og.jpg",
"markdown_content": "# Getting Started with PageGun\n\nPageGun makes it easy to build sites programmatically...\n\n## Step 1: Create a Project\n\nFirst, create a project via the API..."
}'Metadata Fields
| Field | Type | Required | Description |
|---|---|---|---|
page_name | string | Yes | Article title (used as H1 and page title) |
slug | string | Yes | URL slug (e.g., getting-started) |
subroute | string | Yes | URL prefix (e.g., "blog", "articles") |
type | string | Yes | Always "article" |
description | string | No | SEO meta description (155 chars recommended) |
og_image_url | string | No | Open Graph image (1200×630px recommended) |
markdown_content | string | Yes | Full Markdown content |
URL Structure
Articles appear at: yourdomain.com/{subroute}/{slug}
Example: subroute: "blog" + slug: "my-post" → yourdomain.com/blog/my-post
Supported Markdown
- Headings (h1-h6)
- Bold, italic,
strikethrough - Ordered and unordered lists
- Links and images
 - Code blocks with syntax highlighting
- Tables with pipe syntax
- Blockquotes
- Horizontal rules
SEO Best Practices
Slug Tips
| ❌ Bad | ✅ Good |
|---|---|
post-1 | getting-started-with-pagegun |
article_20240115 | build-landing-pages-api |
- Use lowercase, hyphen-separated keywords
- Keep under 60 characters
- Avoid dates in slugs (keeps content "evergreen")
Description
Write a compelling meta description (155 chars max) that includes your target keyword and encourages clicks from search results.
Content Structure
# Primary Heading (matches page_name)
Intro paragraph with target keyword naturally included.
## Subheading with Secondary Keyword
Content in scannable sections with **bold** key points.
### Sub-sections for Detail
- Lists for quick scanning
- [Internal links](/docs/api-reference/pages/list) for SEO
- Code blocks for developersUpdating Articles
# Update content
curl -X PUT "https://api.pagegun.com/pages/PAGE_ID" \
-H "Authorization: Bearer $PAGEGUN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown_content": "# Updated Title\n\nNew content..."}'
# Re-publish to push changes live
curl -X POST "https://api.pagegun.com/pages/PAGE_ID/publish" \
-H "Authorization: Bearer $PAGEGUN_API_KEY"Displaying Articles
Add an Articles Grid section to any page type page:
{
"type": "articles-grid",
"heading": "Latest Posts",
"columns": 3,
"limit": 6
}Related
- Guide: Managing Articles — Full workflow guide
- Articles Grid Section — Display articles in a grid
- Page Types Overview — Compare all page types