Skip to main content

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]:

KeyPurpose
titleSite title — used as <title> fallback and og:site_name.
descriptionDefault meta description, also used for og:description and twitter:description.
keywordsComma-separated meta keywords.
og_imageDefault Open Graph / Twitter Card image (1200×630 recommended). Falls back to logo if not set.
og_typeOne of: website, article, product, profile, book, video.movie, video.episode, music.song, music.album. Defaults to website.
twitter_handleYour Twitter/X handle. Emitted as twitter:site. The @ prefix is added automatically.
theme_colorBrowser-chrome color on mobile (CSS hex / rgb() / hsl()).
langPage language code for <html lang="…">. Defaults to en.
noindextrue 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.

KeyPurpose
descriptionPer-page meta description (overrides site default).
keywordsPer-page keywords.
canonicalAbsolute URL — must start with http:// or https://. Relative paths are silently dropped. Use when content is syndicated from another site.
og_imagePer-page social card.
og_typePer-page Open Graph type (same whitelist as site).
noindextrue / 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"> (page canonical if set, otherwise the page's own URL)
  • <meta name="robots" content="noindex, nofollow"> — only when noindex: true at site or page level
  • <meta name="theme-color">
  • Open Graph: og:title, og:description, og:url, og:type, og:site_name, og:image (plus og:image:width / og:image:height when known)
  • Twitter Card: twitter:card is summary_large_image if an og_image resolves, otherwise summary; plus twitter:title, twitter:description, twitter:image, and twitter:site (from twitter_handle)
  • A JSON-LD WebSite schema block (@type: WebSite) with site name, URL, and description

The og_image falls back through page.meta.og_imagesite.og_imagesite.logo, so even pages that don't configure SEO get a sensible social card if your site has a logo.

Best practices

  • Keep description between 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 canonical when reposting content from another site so you don't compete with the original.
  • Use noindex: true for staging, draft, or utility pages (thank-you confirmations, internal links).
  • The twitter_handle is capped at 32 characters; longer values are silently dropped.
  • Stick to the og_type whitelist — unrecognized values are ignored and the renderer falls back to website.

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: true in their meta: block are excluded.
  • Pages whose canonical points 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: * with Allow: / and a Sitemap: line pointing at /sitemap.xml.
  • When [site] noindex: true is set: User-agent: * with Disallow: / — 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 WebSite only. Richer schemas like Article, FAQPage, or Product are not generated. If you need them, embed them with a raw HTML block.
  • No custom robots.txt rules 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...