Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

[BUG] [TOC] Unable to nest heading beyond 2 level #38

Closed

Description

@farhan443

Describe the bug

The Table of Content (TOC) outlines the headings as written in the markdown / HTML. However, this is only true for up to 2 level nesting. Beyond that, the TOC stops outlining them.

Expected behavior

I expected headings beyond level 2 to be displayed in the TOC.

Screenshots

Source Code:

Screenshot_20210216_162405

Output:

Screenshot_20210216_164016

Screenshot_20210216_164032

Expected Output:

Screenshot_20210216_163951

Build Environment

  • OS: Ubuntu 20.04 LTS
  • Theme version: 1.3.0 (Latest)
  • Hugo version: v0.80.0-extended

Preview Environment

  • OS: Ubuntu 20.04 LTS
  • Browser: Chromium 88.0.4324.150

Additional Information

I wish the issue ends here, but it's not. It creates another problem if you insist on nesting heading beyond 2 level. I'll start a new issue for it.


The screenshot is produced from a freshly installed Hugo site, with a freshly installed uBlogger theme.

Activity

  1. added
    bug
    on Feb 16, 2021
  2. changed the title [-][TOC] Unable to nest heading beyond 2 level[/-] [+][BUG] [TOC] Unable to nest heading beyond 2 level[/+] on Feb 16, 2021
  3. uPagge commented on Feb 16, 2021

    @uPagge
    Owner

    It has nothing to do with the topic. This is controlled by the Hugo settings.

    config.yaml:

    markup:
      tableOfContents:
        startLevel: 2
        endLevel: 6
  4. pinned this issue on Feb 16, 2021
  5. farhan443 commented on Feb 16, 2021

    @farhan443
    Author

    It has nothing to do with the topic. This is controlled by the Hugo settings.

    My bad, you absolutely correct. I'm sorry. I should have known.

  6. farhan443 commented on Feb 16, 2021

    @farhan443
    Author

    config.yaml:

    markup:
      tableOfContents:
        startLevel: 2
        endLevel: 6

    Works perfectly, thanks a lot.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions