wagtail / wagtail/guide

Reflect heading hierarchy in ToC

Open
#377 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
36
Forks
39
Avg merge
2d 5h
Merged PRs (30d)
3

Description

Our guide pages Have a table of contents at the top which is very helpful:

toc-guide

In this example, "Site-specific improvements" is an h2, and the two headings after are h3. It would be nice if this hierarchy was reflected in the TOC – for example with some amount of indentation to show the two headings are "within" the "Site-specific improvements".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating how the table of contents is generated for the guide pages and inspect the heading structure used in the example. The work is done when nested headings such as h3 entries appear indented beneath their h2 heading in the table of contents.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.