-
Is there any configuration option like |
Beta Was this translation helpful? Give feedback.
Answered by
yzx9
Mar 4, 2021
Replies: 1 comment 2 replies
-
Upd: https://vuepress2.netlify.app/advanced/cookbook/adding-extra-pages.html#adding-extra-pages I ran into the same problem. Currently, I think there is not a particular API for creating additional page. So, I use import { createPage, PageOptions } from "@vuepress/core"
export const theme: Theme = (themeOptions, app) => {
return {
onInitialized : async (app: App) => {
const option: PageOptions = {
path: "/about.html",
frontmatter: {
layout: "About",
},
}
const page = await createPage(app, option)
app.pages.push(page)
}
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
meteorlxy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Upd: https://vuepress2.netlify.app/advanced/cookbook/adding-extra-pages.html#adding-extra-pages
I ran into the same problem. Currently, I think there is not a particular API for creating additional page. So, I use
onInitialized
hook to achieve it. However, I can't create a homepage that has a special path:{ path: '/' }
. It works well in dev mode, but take a bug in buiding mode.