Skip to content

Conversation

JosuaMeier
Copy link

Would be nice to have the option to exclude pages from output file.

@aporan
Copy link
Contributor

aporan commented Jul 8, 2020

@JosuaMeier hiya, another fellow plugin user here. Although adding it here would be nice, but i figured out the same result by using patterns in vuepress config:

  patterns: process.env.EXPORT_PDF === 'True' ? ['**/*.md', '**/*.vue', '!**/openapi.md', "!*/index.md", "!index.md"] :  ['**/*.md', '**/*.vue'],

@JosuaMeier
Copy link
Author

@aporan Thx for your response.

If I use the your pattern snippet, its not working. process.env.EXPORT_PDF is undefined. Where do I have to provide this variable.
If it is as easy as you mentioned, I would surely prefer your solution.

Sorry, I am very new on the VuePress topic. (1 day) 🙈

@aporan
Copy link
Contributor

aporan commented Jul 8, 2020 via email

@JosuaMeier
Copy link
Author

@aporan Yeah, works perfectly. No need for this pull request. Thank you.

@JosuaMeier JosuaMeier closed this Jul 8, 2020
@Igloczek
Copy link
Contributor

Igloczek commented Jul 8, 2020

Hi, thanks for this contribution!
I'll open this PR to keep in mind to add this feature, because I need it too.
Currently, since I'm building sidebar links programmatically, I'm filtering pages here, so including it into the plugin itself will be nicer.

@Igloczek Igloczek reopened this Jul 8, 2020
@markmcdowell
Copy link

FYI, I didn't really want to have to create an env. variable so i did this instead:

patterns: process.argv.includes("export") ? ["**/api/**/*.md", '**/*.vue'] : ['**/*.md', '**/*.vue']

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

Successfully merging this pull request may close these issues.

4 participants