tidypress
On this page

Components

Built-in MDX components for notes, tabs, file trees, diagrams, images, tooltips, and steps.

Components are available in .mdx files without imports.

Callout

Notes, warnings, tips, and pull quotes.

<Callout>The config file lives at `docs/tidypress.config.ts`.</Callout>
 
<Callout type="warning">Do not commit `docs/build/` — it is generated. Deploy it, do not treat it as source.</Callout>
 
<Callout type="tip">Run `tidypress clean` if a build looks stale after upgrading TidyPress.</Callout>
 
<Callout type="quote">The canonical copy lives in git, not in an export workflow.</Callout>

Note

The config file lives at docs/tidypress.config.ts.

Warning

Do not commit docs/build/ — it is generated. Deploy it, do not treat it as source.

Tip

Run tidypress clean if a build looks stale after upgrading TidyPress.

Quote

The canonical copy lives in git, not in an export workflow.
PropTypeDefault
type"note" | "warning" | "tip" | "quote""note"

Tabs

Alternate commands or examples.

<Tabs labels={["npm", "pnpm"]}>
<Tab>
```bash
npm install -g tidypress
```
</Tab>
<Tab>
```bash
pnpm add -g tidypress
```
</Tab>
</Tabs>
npm install -g tidypress
pnpm add -g tidypress
PropTypeRequired
labelsstring[]yes

labels must match the number of direct <Tab> children.

FileTree

Project structure. Folders collapse on click. Wrap important files in ** to highlight them.

<FileTree>
- docs/
  - **tidypress.config.ts**
  - public/
    - images/
  - src/
    - content/
      - docs/
        - getting-started.md
      - writing/
        - hello.md
</FileTree>
  • docs/
    • tidypress.config.ts
    • public/
      • images/
    • src/
      • content/
        • docs/
          • getting-started.md
        • writing/
          • hello.md

Two spaces per indent level. No props.

Mermaid

Mermaid diagrams.

<Mermaid code={`
flowchart LR
  Markdown[Markdown files] --> Build[tidypress build]
  Build --> Static[Static site]
  Static --> Host[Static host]
`} />
 
<Mermaid align="center" code={`flowchart TB\n  A --> B`} />
PropTypeDefaultRequired
codestringyes
align"left" | "center" | "right""left"no

Diagrams adapt when the theme changes. Use align="center" for tall vertical flowcharts in narrow writing columns.

Image

Put images in docs/public/ (for example docs/public/images/flower.jpg). Use the component for captions; use markdown for simple embeds.

<Image src="/images/flower.jpg" alt="Colorful tulips in bloom" caption="Vivid spring flowers" />
Colorful tulips in bloom
Vivid spring flowers
PropTypeRequired
srcstring | ImageMetadatayes
altstringyes
captionstringno
widthnumberno
heightnumberno

Same file with markdown:

![Colorful flowers](/images/flower.jpg)

Tooltip

Short inline definitions.

The <Tooltip tip="Static HTML and search land in docs/build/ after tidypress build.">build folder</Tooltip> is regenerated on each build.

The build folder is regenerated on each build.

PropTypeRequired
tipstringyes

Steps

Numbered procedural blocks in MDX. Manual pages use the same components with manual page chrome.

<Steps>
  <Step title="Create content">
    Add markdown under `docs/src/content/docs/`.
  </Step>
  <Step title="Preview locally">
    Run `tidypress dev`.
  </Step>
</Steps>
  1. Create content

    Add markdown under docs/src/content/docs/.

  2. Preview locally

    Run tidypress dev.

ComponentPropTypeRequired
Steptitlestringno

Wrap one or more <Step> elements inside <Steps>.

Native details

Native HTML also works:

<details>
<summary>Generated files</summary>
 
```txt
docs/build/
```
 
</details>
Generated files
docs/build/