Skip to content

Commit

Permalink
docs: add docs for enabling table of content
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-sid committed May 2, 2023
1 parent 26d5f8f commit c0824e3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions exampleSite/content/posts/table-of-content/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: How to enable table of content
date: 2023-05-02
description: Setup table of content in Hugo blog awesome theme
---

## Table of content

This theme supports displaying table of content in blog posts.

To enable it, globally set `toc` to `true` in `config.toml`:

```toml
[params]
toc = true
```

This will enable table of content for all posts. If you want to enable it for a specific post, add `toc = true` to the front matter of the post:

```yaml
---
title: How to enable table of content
date: 2023-05-02
toc: true
---
```

0 comments on commit c0824e3

Please sign in to comment.