# Index Pages

Every folder has a page at its URL, and the site has a start page at its root. Both are written in Markdown, in a file named `index.md`:

| File | Page |
|------|------|
| `docs/index.md` | The start page, `/` |
| `docs/guides/index.md` | The page of the folder `guides`, `/guides` |
| `docs/guides/index.de.md` | Its German translation, `/de/guides` |

An index page is a page like any other, with a heading, text, links, code and alerts. Its front matter also names the folder, see [folders](https://clay-doc.github.io/clay-example-repo/3.x/organizing/folders.md).

## A list of pages and a large header

Two front matter fields lay out index pages:

| Field | Effect |
|-------|--------|
| `list: true` | Lists the folder's pages and subfolders below the text, under the heading "In this section" |
| `hero: true` | Shows `title`, `icon` and `description` as a large, centered header above the text |

The start page of this site uses both fields:

```markdown
---
title: Clay Documentation
icon: fa-solid fa-book-open
description: Turn a folder of Markdown files into a fast, searchable documentation website.
hero: true
list: true
---

New to Clay? Read the [introduction](introduction.md) …
```

With `hero: true`, leave out the `# heading`: the header shows the title already.

## Folders without an index page

A folder without an `index.md`, or one whose `index.md` has no text, gets a page made of its title, its icon and the list of its pages. The site works without any `index.md`; add them where a folder deserves an introduction.

Without `docs/index.md`, the start page shows the site title and a list of the top-level pages and folders.

## In the sidebar

A folder's title in the sidebar opens its page; the arrow next to it shows and hides the pages in it. Breadcrumbs and links to a folder lead to its page too, and so do links to `index.md`:

```markdown
[All guides](guides/index.md)
[All guides](guides/)
```

Links inside an `index.md` are relative to its folder, like on GitHub: in `docs/guides/index.md`, `[Setup](https://clay-doc.github.io/clay-example-repo/3.x/organizing/setup.md)` leads to `docs/guides/setup.md`.

> [!TIP]
> Folder pages appear in search results, and the previous and next links lead through them, before the pages of their folder.

---

All pages of these docs, as Markdown for language models: https://clay-doc.github.io/clay-example-repo/3.x/llms.txt
