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

sidebarDepth: 0 not working in YAML #1701

Closed
1 task done
ragnarlotus opened this issue Jul 16, 2019 · 4 comments
Closed
1 task done

sidebarDepth: 0 not working in YAML #1701

ragnarlotus opened this issue Jul 16, 2019 · 4 comments

Comments

@ragnarlotus
Copy link
Contributor

  • I confirm that this is an issue rather than a question.

Bug report

When using sidebarDepth: 0 in a page YAML the header links keep being displayed.

This is caused by the coalesce assignment in SidebarLink. Concretelly this piece of code:

    const configDepth = $page.frontmatter.sidebarDepth
      || sidebarDepth
      || $themeLocaleConfig.sidebarDepth
      || $themeConfig.sidebarDepth

Steps to reproduce

Just place the value in the top of the page:

---
sidebarDepth: 0
---

I have a repo with the current issue in my repo but I will try to find a workaround so can be fixed when you tested.

What is expected?

To do not show header links

What is actually happening?

It is showing h2 headers

Other relevant information

  • Output of npx vuepress info in my VuePress project:
    Environment Info:
    System:
    OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
    CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
    Binaries:
    Node: 10.15.2 - /usr/bin/node
    Yarn: 1.16.0 - /usr/bin/yarn
    npm: 6.10.1 - ~/.node/bin/npm
    Browsers:
    Chrome: 75.0.3770.100
    Firefox: 68.0
    npmPackages:
    @vuepress/core: 1.0.2
    @vuepress/theme-default: 1.0.2
    vuepress: ^1.0.2 => 1.0.2
    npmGlobalPackages:
    vuepress: 1.0.2
@ulivz
Copy link
Member

ulivz commented Jul 21, 2019

If you want to hide the sidebar, just set sidebar to false via frontmatter:

---
sidebar: false
---

@ulivz ulivz closed this as completed Jul 21, 2019
@ragnarlotus
Copy link
Contributor Author

ragnarlotus commented Jul 21, 2019

You didnt even bother to read the issue, ut is good to know because next time I will not bother to open it.

I do not want to hide the side bar, what i dont want is to show page header links beyond level 0

@ragnarlotus
Copy link
Contributor Author

@danvega
Copy link

danvega commented Sep 3, 2019

It looks like this was tagged for 1.0.3 but I don't see it in that release. Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants