VitePress equivalent of extendPageData from VuePress #1066
Unanswered
erondpowell
asked this question in
Q&A
Replies: 1 comment 1 reply
-
No.
I'm assuming you need to get some data (say from front matter), and add head tags for Another alternative will be available when #551 is resolved. There you'll get an API to modify your head content on build. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there is a VitePress equivalent for Vuepress's
extendPageData
function?In my project, we need data to generate page thumbnail previews (via Thumbsmith) for each docs page.
To do this, I need to assign and use data for each page at build time.
In VuePress, there was an
extendPageData
function:https://vuepress.vuejs.org/plugin/option-api.html#extendpagedata
I see VitePress has a
useData
function:https://vitepress.vuejs.org/guide/api.html#usedata
It appears that this is executed at runtime, client-side.
If that's correct, I don't think this would work in our use-case.
What are my best options?
Beta Was this translation helpful? Give feedback.
All reactions