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

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

Closed
farhan443 opened this issue Feb 16, 2021 · 3 comments
Closed

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

farhan443 opened this issue Feb 16, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@farhan443
Copy link

farhan443 commented Feb 16, 2021

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.

@farhan443 farhan443 added the bug Something isn't working label Feb 16, 2021
@farhan443 farhan443 changed the title [TOC] Unable to nest heading beyond 2 level [BUG] [TOC] Unable to nest heading beyond 2 level Feb 16, 2021
@uPagge
Copy link
Owner

uPagge commented Feb 16, 2021

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

config.yaml:

markup:
  tableOfContents:
    startLevel: 2
    endLevel: 6

@uPagge uPagge closed this as completed Feb 16, 2021
@uPagge uPagge pinned this issue Feb 16, 2021
@farhan443
Copy link
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.

@farhan443
Copy link
Author

config.yaml:

markup:
  tableOfContents:
    startLevel: 2
    endLevel: 6

Works perfectly, thanks a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants