# Automatic Table of Contents generation

**URL:** https://meta.discourse.org/t/automatic-table-of-contents-generation/79626
**Category:** Feature
**Created:** [02.Февраль.2018 14:16:37 UTC](https://meta.discourse.org/t/automatic-table-of-contents-generation/79626 "2018-02-02T14:16:37Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [03.Февраль.2018 12:55:03 UTC](https://meta.discourse.org/t/automatic-table-of-contents-generation/79626/3 "2018-02-03T12:55:03Z")

</div>

> [@pfaffman](#):
>
> It would need settings to determine what level of headers should be included in the toc.

I think a first pass could just hardcode this. I would look at what Google Docs does as a model. They include H1-H6 in the ToC.

The workflow would be something like:

1. Write a post with headers
2. Click a button in the “gear icon dropdown” to generate a ToC
3. ToC is an outline with links to the headings, indented by heading level
4. ToC is just markdown inserted into the composer that you can edit/delete
5. Clicking the “generate ToC” buttons would not replace the existing ToC, but instead, just insert a new one.\*

\* this is different than what Google Docs does, but probably a lot easier and completely acceptable in my opinion.

---

_[View the full topic](https://meta.discourse.org/t/automatic-table-of-contents-generation/79626)._
