Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow markdown.toc.includeLevel override for specific pages #599

Closed
neumayr opened this issue Jun 17, 2018 · 5 comments
Closed

allow markdown.toc.includeLevel override for specific pages #599

neumayr opened this issue Jun 17, 2018 · 5 comments
Assignees
Labels
type: feature request Request to add a new feature

Comments

@neumayr
Copy link

neumayr commented Jun 17, 2018

Bug report

My Page is structured with a lot of headlines, separating sections. I want so specify ony this one page to have a detailed rendered table of contents. I would not setup these detailed level for the complete project documentation. See attached example.

Version

$ npx vuepress --version
0.10.1

Steps to reproduce

---
sidebarDepth: 2
markdown:
  toc:
    includeLevel:
      - 2
      - 3
      - 4
---

# My Page

[[toc]]

## Headline A

### Headline A1
#### A first

### Headline A2
#### A second

### Headline A3
#### A third

## Headline B

### Headline B1
#### B first

### Headline B2
#### B second

### Headline B3
#### B third

What is expected?

[[toc]] should respect page configuration for markdown.toc.includeLevel and all headlines should be rendered trought the table of contents for this page, in my example.

:octocat: https://vuepress.vuejs.org/config/#markdown-toc

What is actually happening?

markdown.toc.includeLevel is being ignored in documents Front Matter. I can only setup includeLevel globally in config.js

Other relevant information

  • Your OS: Mac OS X 10.13.5
  • Node.js version: v9.10.1
  • Browser version: Chrome v67
  • Is this a global or local install? local
  • Which package manager did you use for the install? npm
@ulivz
Copy link
Member

ulivz commented Jun 17, 2018

Please use config.js to set markdown config since all markdown configurations are for global, not for a particular page.

BTW, please have a closer look to the documentation, Thank you.

@ulivz ulivz closed this as completed Jun 17, 2018
@neumayr
Copy link
Author

neumayr commented Jun 18, 2018

@ulivz Thank you for making this clear. I've checked the documentation carefully and just was wondered because for example sidebarDepth can also be set for a particular page. And this is very useful, of course.

Anyway, you are fast in responding and closing issues. In my eyes, it's first a bug (because it's not explicitly described) and maybe can transform into a discussion about how valuable this is for the future and product. ✌️🌻

@thiemo
Copy link

thiemo commented Oct 15, 2018

+1

@rufuspollock
Copy link

I would love this feature too ...

@ulivz ulivz added the type: feature request Request to add a new feature label Jan 8, 2019
@ulivz ulivz self-assigned this Jan 8, 2019
@ulivz ulivz reopened this Jan 8, 2019
@shigma
Copy link
Collaborator

shigma commented Mar 8, 2019

Fixed due to #1375.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request to add a new feature
Projects
None yet
Development

No branches or pull requests

5 participants