On this page

Quickstart

Create a TidyPress site, publish the first page, and inspect the production artifact.

In this guide you will create a docs-and-writing site, preview it locally, add a page, and build the exact folder a static host receives.

  1. Install the package
     npm install tidypress 
     pnpm add tidypress 
  2. Scaffold a publishing root
     npx tidypress init --preset docs-writing --site-url https://docs.example.com 

    TidyPress creates site/, the default publish root. Use a real production URL when you know it; canonical URLs, Open Graph URLs, RSS, and sitemap output depend on it.

  3. Start the development server
     npx tidypress dev 

    Open http://localhost:4321. The CLI discovers site/tidypress.config.ts from the repository root.

  4. Publish a documentation page

    Create site/src/content/docs/first-build.mdx:

     ---
    title: First build
    description: Verify the complete author-to-artifact path.
    order: 2
    ---
     
    <Steps>
      <Step title="Write">Edit this file in git.</Step>
      <Step title="Build">Run `npx tidypress build`.</Step>
    </Steps> 

    MDX components are registered by the engine; no local import is needed.

  5. Build and inspect production output
     npx tidypress build
    npx tidypress preview 

    The default artifact is site/build/ and includes static pages, bundled assets, the Pagefind index, and llms.txt. Search is a production-build feature, so validate it through preview rather than dev.

What was created

  • site/
    • tidypress.config.ts
    • public/
    • src/
      • content/
        • docs/
        • writing/
        • pages/
    • build/

The folder containing tidypress.config.ts is the publish root. The src/content/docs/ folder is the docs collection. They are different concepts even when the publish root happens to be named site/.

Choose a different starting shape

PresetInitial public shape
labWriting and projects; docs and pages disabled
blogWriting only
personaHero, projects, writing, and an About page
docs-writingDocs and writing
body-of-workWorks, projects, writing, reference, and process; docs disabled
body-of-work-docsBody of work plus product docs
customDocs, writing, and a sample playbooks collection

default is an alias for lab.

Useful next commands

 npx tidypress doctor
npx tidypress clean
npx tidypress build --output ./dist
npx tidypress build --no-llms-txt 

doctor checks the baseline setup. clean removes the publish-root build and TidyPress cache. --output selects another build directory. --no-llms-txt omits the agent-readable Markdown artifact for that build.

Next steps