SEO
Micropage emits a full set of SEO and social-sharing tags on every published page — meta description, Open Graph, Twitter Card, canonical, robots, theme-color, and a JSON-LD WebSite schema — and serves sitemap.xml and robots.txt automatically. You control site-wide defaults in the [site] block and override them per page via a meta: subblock inside any [page].
Site-level SEO
Add these keys directly inside [site]:
| Key | Purpose |
|---|---|
title | Site title — used as <title> fallback and og:site_name. |
description | Default meta description, also used for og:description and twitter:description. |
keywords | Comma-separated meta keywords. |
og_image | Default Open Graph / Twitter Card image (1200×630 recommended). Falls back to logo if not set. |
og_type | One of: website, article, product, profile, book, video.movie, video.episode, music.song, music.album. Defaults to website. |
twitter_handle | Your Twitter/X handle. Emitted as twitter:site. The @ prefix is added automatically. |
theme_color | Browser-chrome color on mobile (CSS hex / rgb() / hsl()). |
lang | Page language code for <html lang="…">. Defaults to en. |
noindex | true to mark the entire site noindex, nofollow. |
Example:
[site]
title: Acme Widgets
description: Beautifully simple widgets for makers.
keywords: widgets, gadgets, makers, hardware
og_image: <- /assets/social-card.png
og_type: website
twitter_handle: @acmewidgets
theme_color: #5c6fff
lang: en
Page-level SEO
Inside any [page -> /url], declare an indented meta: block to override site defaults for that page. The meta: block must appear before any /// section separator.
| Key | Purpose |
|---|---|
description | Per-page meta description (overrides site default). |
keywords | Per-page keywords. |
canonical | Absolute URL — must start with http:// or https://. Relative paths are silently dropped. Use when content is syndicated from another site. |
og_image | Per-page social card. |
og_type | Per-page Open Graph type (same whitelist as site). |
noindex | true / false — overrides the site-wide setting for this page. |
Example:
[page -> /blog/launch]
meta:
description: We're launching Acme Widgets v2 — here's what changed.
keywords: acme widgets, launch, v2, release notes
og_image: <- /assets/launch-card.png
og_type: article
canonical: https://acmewidgets.com/blog/launch
# We're live
What gets emitted
Per published page, Micropage renders:
<title>and<html lang="…"><meta name="description">and<meta name="keywords">(page value wins over site)<link rel="canonical">(pagecanonicalif set, otherwise the page's own URL)<meta name="robots" content="noindex, nofollow">— only whennoindex: trueat site or page level<meta name="theme-color">- Open Graph:
og:title,og:description,og:url,og:type,og:site_name,og:image(plusog:image:width/og:image:heightwhen known) - Twitter Card:
twitter:cardissummary_large_imageif anog_imageresolves, otherwisesummary; plustwitter:title,twitter:description,twitter:image, andtwitter:site(fromtwitter_handle) - A JSON-LD
WebSiteschema block (@type: WebSite) with site name, URL, and description
The og_image falls back through page.meta.og_image → site.og_image → site.logo, so even pages that don't configure SEO get a sensible social card if your site has a logo.
Best practices
- Keep
descriptionbetween 50–160 characters — search engines truncate longer ones. - Use a 1200×630 PNG or JPG for
og_image. Anything smaller may be downscaled by social platforms. - Set page-level
canonicalwhen reposting content from another site so you don't compete with the original. - Use
noindex: truefor staging, draft, or utility pages (thank-you confirmations, internal links). - The
twitter_handleis capped at 32 characters; longer values are silently dropped. - Stick to the
og_typewhitelist — unrecognized values are ignored and the renderer falls back towebsite.
sitemap.xml
Every published site exposes /sitemap.xml automatically. The site URL is set from your project's custom domain (or the default *.micropage.sh host) — there's nothing to configure.
Contents:
- One
<url>entry per page, with<loc>(absolute URL) and<lastmod>(the deploy timestamp). - Pages with
noindex: truein theirmeta:block are excluded. - Pages whose
canonicalpoints to a different hostname are excluded (they belong to that other site). - If the site has
noindex: true, the sitemap is emitted empty (<urlset></urlset>).
robots.txt
Every published site exposes /robots.txt automatically:
- Default:
User-agent: *withAllow: /and aSitemap:line pointing at/sitemap.xml. - When
[site] noindex: trueis set:User-agent: *withDisallow: /— the whole site becomes uncrawlable.
There's no way to add custom Disallow rules from markup; use per-page noindex to hide individual pages from indexing.
What Micropage does NOT auto-generate
- JSON-LD is
WebSiteonly. Richer schemas likeArticle,FAQPage, orProductare not generated. If you need them, embed them with a raw HTML block. - No custom
robots.txtrules beyond the global noindex flag.
Complete example
[site]
title: Acme Widgets
description: Beautifully simple widgets for makers.
keywords: widgets, gadgets, makers
og_image: <- /assets/social-card.png
og_type: website
twitter_handle: @acmewidgets
theme_color: #5c6fff
lang: en
[nav]
- Home -> /
- Blog -> /blog/launch
[page -> /]
# Welcome to Acme
We make widgets that just work.
[page -> /blog/launch]
meta:
description: We're launching Acme Widgets v2 — here's what changed.
og_image: <- /assets/launch-card.png
og_type: article
# Launching v2
Today we shipped a complete redesign...