Skip to content

Feature request: Zola Table of Contents #1616

Open
@jieyouxu

Description

@jieyouxu
Member

For some longer blog posts, I find having a per-page TOC to be quite useful. Maybe e.g. https://www.getzola.org/documentation/content/table-of-contents/ could be enabled for the blog?

Activity

senekor

senekor commented on May 23, 2025

@senekor
Contributor

Sounds good. It should probably be disabled by default, right? It could be enabled in the front matter of a post:

[extra]
toc = true

That variable can then be read by the template to conditionally enable the toc.

jieyouxu

jieyouxu commented on May 23, 2025

@jieyouxu
MemberAuthor

It should probably be disabled by default, right?

Yeah, I imagine it's way more distracting than helpful if your blog post "fits within a page", so to speak.

senekor

senekor commented on May 28, 2025

@senekor
Contributor

I experimented a bit, but I honestly couldn't get it to a place where I was happy with it. Maybe someone else is more creative than me. I don't intend to work on this myself, but I'm open to PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jieyouxu@senekor

        Issue actions

          Feature request: Zola Table of Contents · Issue #1616 · rust-lang/blog.rust-lang.org