Configure Landing Page Blocks and SEO in YAML
Read a bundled block schema, compose a page in YAML, and check the search metadata served by the published revision.
LitPage stores a landing page as a versioned configuration. The order of configuration.sections determines the reading order of the blocks. The configuration.pageMetadata object describes the page and its search appearance. You can work with both in a local YAML file and use Builder to check the result before publishing.
Find an authoring contract
npx @litpage/cli block list
npx @litpage/cli block schema PageHeader --variant compact
npx @litpage/cli block example PageHeader --variant compact --format yaml
npx @litpage/cli block list shows the authoring contracts bundled with your CLI version. CLI 0.7.0 includes schemas and YAML examples for all 30 landing-page block types available in Builder. Use --variant with block schema to inspect variants with different fields, such as PageTemplate showcase. Read setup for a block that requires published products, a demo page, or another service. Use the variant and exact field names from the example. If you are editing a page that already contains other blocks, pull the complete page first and preserve the existing sections outside your change.
Each section needs its own ID. Choose a stable name that describes its job, such as intro or featured-products. Keep the ID when editing the existing block. Use a clear main heading first, then add sections in the order a visitor needs to read or act.
Set the page metadata
configuration:
pageMetadata:
schemaVersion: 1
title: Studio field guide
description: An introduction to our workshop and materials.
seo:
title: Studio Field Guide
description: Learn how the workshop prepares clay, applies glaze, and fires studio pieces.
ogImage: null
indexable: true
sections:
- id: guide-intro
type: PageHeader
variant: compact
title: Studio field guide
description: See how we prepare and fire our ceramics.
This fragment belongs inside a complete page file. Use the first page tutorial for the required root fields and a complete example. If both top-level title and configuration.pageMetadata.title are present, keep them identical. Apply the same rule to the two description fields. The visible heading comes from the block. Choose a descriptive search title and description for the same page topic. Set ogImage to an HTTPS URL or an absolute site-relative path for a sharing image. Use ogImage: null if you have no image to set.
Review the published output
Save a draft and review both desktop and narrow-screen previews. If the page is a test, set seo.indexable to false before publishing. The published page can still be opened by URL. A real public page can set it to true to become eligible for indexing.
After publication, check the verified revision and canonical URL with npx @litpage/cli page verify. The site, route, and language determine the canonical address. Open that address to verify the visible heading, the document title, and the metadata in the HTML. For an indexable page, check that the canonical URL appears in the sitemap. For a test page, confirm it emits noindex and stays out of the sitemap.
Run npx @litpage/cli page validate --file page.page.yaml before saving. The CLI parses YAML as JSON-compatible data, then validates block fields against the selected Schema.
Continue with update a published landing page to apply the same changes to a live page.