Skip to content
TileDownSite version v0.5.24

A table of contents with one line

TileDown 0.13.0 adds toc true, which anchors the h2 and h3 headings of a long page and puts a list of links to them first.

A table of contents with one line

Put toc: true in the front matter of a page:

---
title: A long page
toc: true
---

TileDown anchors the page’s h2 and h3 headings and puts a list of links to them first. This page does it, so the list above this paragraph is built, not written.

The anchors

An anchor is the heading text in lowercase with hyphens. A repeated heading gets -2, -3 and so on, so every link goes to its own heading.

When there is no list

A page with fewer than two such headings gets no list, and a page without toc is unchanged.

The look

The editorial theme styles the list. The other themes show a plain list.

TileDown Updates

Stay updated with every exciting new feature we bring to TileDown, the Markdown‑first way to build sites you truly own.

View Markdown source
index.md
---
title: A table of contents with one line
date: 2026-11-22
description: TileDown 0.13.0 adds toc true, which anchors the h2 and h3 headings of a long page and puts a list of links to them first.
tags: Release, Navigation, Markdown
toc: true
image: /assets/post-contents.svg
imageDark: /assets/post-contents-dark.svg
---
# A table of contents with one line

Put `toc: true` in the front matter of a page:

```yaml
---
title: A long page
toc: true
---
```

TileDown anchors the page's `h2` and `h3` headings and puts a list of links to them
first. This page does it, so the list above this paragraph is built, not written.

## The anchors

An anchor is the heading text in lowercase with hyphens. A repeated heading gets `-2`,
`-3` and so on, so every link goes to its own heading.

## When there is no list

A page with fewer than two such headings gets no list, and a page without `toc` is
unchanged.

## The look

The `editorial` theme styles the list. The other themes show a plain list.