Skip to main content

Update a Published Landing Page with the LitPage CLI

Export an existing landing page, save a YAML edit as a draft, and check the exact revision that becomes public.

Use this workflow to change a live landing page while keeping its address stable. You will export the current authoring configuration, edit a copy, save a draft, and verify the revision after publication. Use a test site and a page you can safely refresh for your first run.

Locate the page and export the snapshot

List the site's pages and export the one that matches the public address you intend to edit. This tutorial uses CLI 0.7.0.

npx @litpage/cli page list --subdomain your-site --language EN
npx @litpage/cli page pull --subdomain your-site --path /workshop --out current.page.yaml

Save a copy named edited.page.yaml in your editor. If the same path is available in several languages, pass --language for the one you intend to update.

Keep the original export. In Windows, copy the file in Explorer or use PowerShell's Copy-Item current.page.yaml edited.page.yaml. The copy can contain a more recent authoring draft, so always compare it with the public page before editing. The version fields in the export tell the server what the edit is based on. Keep those fields as well as the site and page IDs.

Change the body and search metadata

Update the appropriate item in configuration.sections. For versioned SEO, edit configuration.pageMetadata.seo. Preserve sections that are outside your task. If the file has both top-level title and configuration.pageMetadata.title, make them equal or remove the top-level copy. Apply the same rule to top-level description and configuration.pageMetadata.description. The block heading and seo.title can each describe the same page in their own words.

npx @litpage/cli page save --file edited.page.yaml --out saved.page.yaml

Open the draft preview in Builder. Check the affected section, title, links, and layout. Open the public URL in a separate window and confirm visitors still see the previous revision. This is a useful moment to compare the draft against an editor's request or review notes.

Publish the saved revision

npx @litpage/cli page publish --file saved.page.yaml --out published.page.yaml
npx @litpage/cli page verify --file published.page.yaml

Check the verified revision and canonical URL, then open the URL to see the actual rendered result. This publication is scoped to the page. Shared header, footer, and product drafts have their own publication steps.

If the publish request times out and the outcome is unknown, check the public version first. Retry with the same saved draft and the same local CLI state so the CLI can reuse the operation ID. A conflict means the expected page or navigation state has changed. Pull into a separate file and reconcile the changes before publishing a new request. If verification reports a different public revision after an accepted publication, recheck delivery before sending another publish operation.

For new pages, start with the first landing page tutorial. For workspace and site checks, see set up access.