Skip to main content

Publish LitPage Documentation with Claude Code

Have Claude Code draft, validate, and publish a Markdown article to a known LitPage documentation folder.

Use Claude Code to turn approved project notes into a public help article. The session can read your notes, generate a LitPage DOC file, and save it as a draft. You choose the target folder and review the work before publication.

Check the local session

Launch Claude Code with Node.js, npm, npx, and a test Workspace Key available as LITPAGE_WORKSPACE_KEY. Ask it to run npx @litpage/cli --version, npx @litpage/cli doctor, and npx @litpage/cli site resolve YOUR_SITE to check the version, access, and target. Review the command and target if the shell asks for approval. CLI setup · Claude Code permissions

Draft an article in its real folder

Give the session the site, language, approved source notes, and intended reader. Have it inspect npx @litpage/cli docs tree before selecting the root and parent. If the intended container is absent, follow the DOC publishing guide to create it explicitly with npx @litpage/cli docs create-root or npx @litpage/cli docs create-folder.

Use the approved notes in setup-notes.md to write an English setup guide for YOUR_SITE. Run npx @litpage/cli docs tree --subdomain YOUR_SITE --language EN to find the Guides root and its Setup folder. Generate setup-guide.md with npx @litpage/cli docs template using the actual root and folder slugs. Write the article and run npx @litpage/cli content validate ./setup-guide.md. Save a draft with npx @litpage/cli apply ./setup-guide.md --subdomain YOUR_SITE and report the article title, slug, and location. Wait for my review before publishing.

Review the local file for accuracy, then find the draft in Builder. Confirm its language and folder, and open the preview. Keep only non-secret project conventions in a CLAUDE.md file if you use the workflow regularly. Claude Code project instructions

Publish after review

Ask the session to run npx @litpage/cli publish ./setup-guide.md --subdomain YOUR_SITE after you approve the draft. Open the public article and verify its body, links, active root, and navigation group. Check the exported location and revision with npx @litpage/cli content pull --type DOC --slug ARTICLE_SLUG --language EN --subdomain YOUR_SITE --out setup-guide-current.md. If the folder changed in Builder, refresh the local export before making another edit.

The DOC publishing guide gives the individual commands and explains the root and parent fields.