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

Clarification on generating dynamic pages #1270

Closed
dquist opened this issue Feb 9, 2019 · 4 comments
Closed

Clarification on generating dynamic pages #1270

dquist opened this issue Feb 9, 2019 · 4 comments

Comments

@dquist
Copy link

dquist commented Feb 9, 2019

First of all, thank you guys for this amazing project, everything about it is beautiful and I can't wait to see it mature.

I am looking for clarification if there is built-in support for handling dynamic page generation, or if this is something that I should implement via a custom plugin.

My use case is that I am trying to generate a documentation site for a python library, where each class gets it's own page generated at build-time from the source docstrings. I could of course create these files separately, but I would really like to avoid have the same documentation duplicated in multiple places.

Is this something that would best be handled as a plugin using one of the life cycle hooks? Has the life cycle API stabilized yet?

I saw #452, but that seemed to be referring to dynamic data files, not pages, so I wasn't sure that discussion applied here.

@ulivz ulivz added the question label Feb 9, 2019
@ulivz
Copy link
Member

ulivz commented Feb 9, 2019

Thanks for your interest in VuePress!

For now you can only add dynamic pages via plugin api: additionalPages, a tip is that all the plugin apis can also be used at site config(.vuepress/config.js), so you can test it at your docs first, if you found it can be reused by other people, you can separate it as a standalone plugin.

Oh, another thing, the plugin api was introduced by 1.x, so make sure that you are using the correct version, of course, latest version should be better!

@ulivz ulivz closed this as completed Feb 9, 2019
@dquist
Copy link
Author

dquist commented Feb 9, 2019

Thanks!

@dquist
Copy link
Author

dquist commented Feb 13, 2019

Can additionalPages take a raw Vue component or does it only accept markdown content?

@shalu0317
Copy link

can i add a dynamic uri inside my additionalPages? I want to accept a value inside my additionalPages and pass it as my url. so that it is different for different users. Pls reply asap

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