Skip to content

Frontmatter

Control page metadata, navigation, layout, and home-page content from the file itself.

Frontmatter keeps page-specific decisions close to the page. Use it for titles, descriptions, sidebar order, layout choices, table-of-contents behavior, edit links, and homepage content.

Basic Usage

---
title: My Page Title
description: A description for SEO
---
# Page Content

Your content here...

Available Options

title

  • Type: string

The title of the page. Used in the browser tab and as the <h1> if not provided in content.

---
title: Getting Started
---

description

  • Type: string

The description of the page. Used for SEO meta tags.

---
description: Learn how to get started with Ardo
---

Ardo also renders description as the visible lede under the page title. If the first body paragraph has the same normalized text, Ardo skips the lede to avoid showing the sentence twice.

lede

  • Type: boolean
  • Default: true

Set lede: false when description should be metadata-only.

---
title: Getting Started
description: Learn how to get started with Ardo
lede: false
---

Social metadata

Markdown routes without their own meta export get generated browser, canonical, Open Graph, and Twitter metadata from frontmatter and site config.

---
title: Getting Started
description: Learn how to get started with Ardo
canonical: https://example.com/guide/getting-started
ogTitle: Start building with Ardo
ogDescription: A focused guide to Ardo projects
ogImage: /social/getting-started.png
ogType: article
twitterCard: summary_large_image
twitterDescription: A focused guide to Ardo projects
twitterImage: /social/getting-started-twitter.png
twitterTitle: Start building with Ardo
---
  • canonical overrides the generated canonical URL and og:url.
  • ogTitle, ogDescription, ogImage, and ogType control Open Graph tags.
  • twitterTitle, twitterDescription, twitterImage, and twitterCard control Twitter Card tags.
  • Relative canonical and image values are made absolute with siteUrl; without siteUrl, relative URL tags are omitted.

layout

  • Type: 'doc' | 'home' | 'page'
  • Default: 'doc'

The layout to use for the page.

  • doc - Documentation layout with sidebar and TOC
  • home - Home page layout with hero and features
  • page - Simple page without sidebar
---
layout: home
---
  • Type: boolean
  • Default: true

Whether to show the sidebar on this page.

---
sidebar: false
---

For ArdoGeneratedSidebar, sidebar: false also removes leaf markdown pages from generated navigation.

order

  • Type: number

Controls the generated sidebar order for pages within the same directory. Items with order appear before unordered items; unordered items fall back to alphabetical sorting.

---
title: Getting Started
order: 1
---

Directory index metadata

When a route directory contains index.md or index.mdx, its frontmatter configures the generated directory group rendered by ArdoGeneratedSidebar.

---
title: Guide
order: 10
collapsed: false
---
  • title sets the group label.
  • order sorts the group among sibling sections unless sidebar.sectionOrder prioritizes the top-level section.
  • collapsed sets the initial collapsed state for the group.

outline

  • Type: boolean | number | [number, number]
  • Default: true

Configure the table of contents.

---
outline: [2, 3] # Show h2 and h3 headings
---
  • Type: boolean
  • Default: true

Whether to show the "Edit this page" link.

---
editLink: false
---

lastUpdated

  • Type: boolean
  • Default: true

Whether to show the last updated time.

---
lastUpdated: false
---

Build Output Options

sitemap

  • Type: boolean
  • Default: true

Exclude a Markdown route from the generated sitemap without hiding it from navigation.

---
title: Internal Migration Notes
sitemap: false
---

llms

  • Type: boolean
  • Default: true

Exclude a Markdown route from /llms.txt and /llms-full.txt. This is useful for pages that are valid docs for humans but noisy in a single-file model context, such as generated changelogs or large fixture references.

---
title: Fixture Catalog
llms: false
---

redirectFrom

  • Type: string | string[]

Generate static redirects from old paths to this page. Use a string for one legacy path or an array for several old locations.

---
title: Configuration
redirectFrom:
  - /config
  - /guide/options
---

Ardo combines page-level redirects with the global redirects array from ardo() config and emits host-friendly redirect assets during production builds.

prev / next

  • Type: string | { text: string; link: string } | false

Override the previous/next page links.

---
prev: /guide/introduction
next:
  text: Advanced Topics
  link: /guide/advanced
---

Home Page Options

hero

Configure the hero section on home pages:

---
layout: home
hero:
  name: Ardo
  text: React-first Documentation
  tagline: Build beautiful documentation sites
  image: /logo.png
  actions:
    - text: Get Started
      link: /guide/getting-started
      theme: brand
    - text: GitHub
      link: https://github.com
      theme: alt
---

features

Add feature cards to home pages:

---
layout: home
features:
  - title: Fast
    icon: "⚡"
    details: Lightning fast builds with Vite
    link: /guide/performance
    linkText: Learn more
  - title: Simple
    icon: "✨"
    details: Easy to set up and use
---