Publish Markdown with the LitPage CLI
Send local Markdown files to your LitPage site. Save a draft for review or publish from your terminal.
From a local file to a published post
You need Node.js 18 or later, an existing LitPage site and a workspace API key.
Check your site access
Set LITPAGE_WORKSPACE_KEY through your environment or secret manager. Run npx @litpage/cli doctor to check which sites the key can access.
Prepare a Markdown file
Add a title, stable slug and target site subdomain to the frontmatter. Run npx @litpage/cli content template --help for starter file options.
Save a draft
Run npx @litpage/cli apply ./post.md to save the file as a draft. Review it in LitPage before publishing.
Publish when ready
Run npx @litpage/cli publish ./post.md to publish to the site in the file’s frontmatter. The command returns a JSON result.