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

set sidebar: auto as default configure of pages #552

Closed
tyrion-yu opened this issue Jun 7, 2018 · 1 comment
Closed

set sidebar: auto as default configure of pages #552

tyrion-yu opened this issue Jun 7, 2018 · 1 comment
Labels
type: feature request Request to add a new feature

Comments

@tyrion-yu
Copy link

Feature request

What problem does this feature solve?

If someone use VuePress to build a blog of himself, he may have tons of files in his docs directory.
He may want all his contents have a sidebar of the content.
It's crazy to append FrontMatter Config to all the files.

What does the proposed API look like?

In the .vuepress/config.js, we can set sidebar property to auto. Then all the pages have this value for default. FrontMatter on single page still have higher priority to rewrite the default value.

How should this be implemented in your opinion?

// resolveSidebarItems
const { themeConfig } = site
const pageSidebarConfig = page.frontmatter.sidebar || themeConfig.sidebar
if (pageSidebarConfig === 'auto') {
    return resolveHeaders(page)
}

Are you willing to work on this yourself?**

I'm not sure. At least Not Recently.

@ulivz ulivz closed this as completed in 56cbb5f Jun 7, 2018
@ulivz
Copy link
Member

ulivz commented Jun 7, 2018

Thanks, it's truly an useful feature. finalized it at 56cbb5f

@ulivz ulivz added the type: feature request Request to add a new feature label Jun 7, 2018
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

2 participants