Static blog site generator in one Go binary: Markdown in, self-contained semantic HTML out. No JavaScript, no database, minimal deps.

Feature request optional TOC #20

Closed janantos.tngl.sh
Closed opened by janantos.tngl.sh

Sometimes it would be nice to be able to enable the TOC for selected postings. As a solution, I imagine a field within the YAML frontmatter like following:

---
title: Hello World!
description: Welcoming the world
tags: [Greetings]
toc: true
---

Where toc: should default to false

Hi, do you mean table of contents based on headers? Similar way like confluence does? All the times on top after post title?

Yes, that's what I meant. An example can be found here. TOC entries are listed as inline URLs so readers are able to jump to desired sections.

Edit: The Table of contents doesn't need to be sticky.

I think sticky table will eventually steal too much of view space, lets make it non-sticky.

Non-sticky will be perfect otherwise it feels very annoying in my opinion.

Tested and amazed 🙏

Sign up or Sign in to add to the discussion.