# Page frontmatter

Every page starts with YAML frontmatter, separate from `writedocs.json`:

```mdx
---
title: Getting Started
description: Optional, used for the page's <meta name="description">
---

Page content here.
```

<Parameter name="title" type="string">
  Rendered as the page's `<h1>` automatically. Without one, the title comes from the file name: dashes and underscores become spaces, and the first letter is capitalized - `getting-started.mdx` is titled "Getting started".
</Parameter>

<Parameter name="description" type="string">
  Used for `<meta name="description">`. Falls back to `writedocs.json`'s top-level `description` if omitted.
</Parameter>

<Parameter name="slug" type="string">
  Overrides the URL this page is served at. See below.
</Parameter>

<Parameter name="openapi" type="string">
  Marks this page as a hand-written OpenAPI operation override. See [API Reference (OpenAPI)](/docs/openapi/overview/).
</Parameter>

<Parameter name="seo" type="object">
  Per-page meta tag overrides (`ogImage`, `ogType`, `twitterCard`, `keywords`, `noindex`). Falls back field-by-field to `writedocs.json`'s top-level `seo`. See [SEO and sitemap](/docs/configuration/seo-and-sitemap/).
</Parameter>

<Parameter name="mode" type='"default" | "wide" | "frame" | "custom" | "blank"' default='"default"'>
  How much site chrome (topbar, sidebar, table of contents) wraps this page. See [Page modes](/docs/content/page-modes/).
</Parameter>

<Parameter name="sidebarTitle" type="string">
  A shorter label for this page in the sidebar and topbar dropdown menus. The page's heading and prev/next links still use `title`.
</Parameter>

<Parameter name="icon" type="string">
  Shown before the page's label in the sidebar. An icon name, an emoji, or an image URL or path - see [Icons](/docs/content/components/icon/#icons).
</Parameter>

<Parameter name="tag" type="string">
  A short label shown after the page's name in the sidebar, e.g. `"NEW"` or `"Beta"`.
</Parameter>

<Parameter name="deprecated" type="boolean">
  Shows a "Deprecated" label next to the page's title, and in the sidebar.
</Parameter>

<Parameter name="hidden" type="boolean">
  Leaves the page out of the sidebar, topbar dropdowns, and previous/next links, even if `writedocs.json` lists it. The page is still built and reachable by its URL, and is noindexed (see `seo.noindex`) unless the page sets `noindex: false`.
</Parameter>

<Parameter name="url" type="string">
  Turns the page into an external link: its sidebar entry opens `url` in a new tab, and the page's own URL redirects there. The page's body isn't shown anywhere, and it's left out of `sitemap.xml`, `llms.txt`, and previous/next links.
</Parameter>

<Parameter name="hideFooterPagination" type="boolean">
  Removes the previous/next links at the bottom of the page.
</Parameter>

<Parameter name="hideApiMarker" type="boolean">
  On an OpenAPI page (`openapi:` set), removes the HTTP method badge from its sidebar entry.
</Parameter>

Mintlify's top-level SEO fields are also accepted, and mean the same as their `seo` equivalent: `noindex` (`seo.noindex`), `keywords` (`seo.keywords`), `"og:image"` (`seo.ogImage`), `"og:type"` (`seo.ogType`), and `"twitter:card"` (`seo.twitterCard`). If a page sets both spellings, the `seo` one wins. See [Migrating from Mintlify](/docs/migrating-from-mintlify/).

<Callout type="warning">
  Don't repeat `title` as a `# Heading` in the page body — it's rendered automatically and you'll end up with it twice.
</Callout>

## `slug`

Overrides the URL a page is served at, independent of where the file actually lives on disk — `writedocs.json`'s `navigation` still references the file by its own path regardless of this override.

```mdx
---
title: New Guide Name
slug: guides/new-name
---
```

A file at `docs/legacy/old-name.mdx` (referenced in `writedocs.json` as `legacy/old-name`) with `slug: guides/new-name` is served at `/guides/new-name/` — the sidebar, prev/next links, and page title all resolve correctly through the override; only the actual URL changes.

Leading/trailing slashes don't matter — `slug: /`, `slug: guides/x`, and `slug: /guides/x/` all mean the same thing. `slug: /` makes a page the site's homepage.