The main problem is that we need to ensure the parent scope of our config exists and we should not drop any existing config. So that's our helper goal.
For seo feed or blogging, we need a concept called excerpt to describe a page main content using html, while VuePress2 remove this from core.
A good generator should do the following things:
removing Vue Components because they can not be rendered outside page.
adjusting contents, like removing header anchor, code block line numbers and highlight lines, removing image with relative path, converting <RouterLink> to <a> tag and so on.
Support stopeed with excerpt marker, or stop when reaching a theahold.
Clear and concise description of the problem
Add some helper functions for developer.
They might be commonly used while developing plugins and themes, but not part of functionality of vuepress core.
Suggested solution
A new
@vuepress/helper
package.Details
Client
Noop module
Proving
@vuepress/helper/noopModule
and@vuepress/helper/noopComponent
for empty pkg and vue component.This can be useful when developers want to do tree-shaking with
alias
.Node
Bundler Related
We provide a lot of bundler related files, as it's likely for a plugin or theme to modify bundler config.
Writing codes directly can be annoying, see the following example:
The main problem is that we need to ensure the parent scope of our config exists and we should not drop any existing config. So that's our helper goal.
Docs already exists at https://shared.vuejs.press/node/bundler.html (published as
vuepress-shared
)Excerpt Related
For seo feed or blogging, we need a concept called excerpt to describe a page main content using html, while VuePress2 remove this from core.
A good generator should do the following things:
<RouterLink>
to<a>
tag and so on.So that's
getPageExcerpt
for.