-
-
Couldn't load subscription status.
- Fork 2.5k
Open
Description
Is your feature request related to a problem? Please describe.
I spent a few hours trying to figure out how to add pinia - I searched the docs, I tried some things, I looked at the pinia docs. I even tried the AI chat bot in this page, which sent me around in circles with bad advice. Anyway, I found the solution in these issues but wish it were more obvious
Describe the solution you'd like
In the docs, have:
to install pinia when using the default vitepress theme, add the following file:
// .vitepress/theme/index.ts
import { EnhanceAppContext } from "vitepress";
import DefaultTheme from "vitepress/theme";
import { createPinia } from "pinia";
export default {
...DefaultTheme,
enhanceApp(ctx: EnhanceAppContext) {
DefaultTheme.enhanceApp(ctx);
const pinia = createPinia();
ctx.app.use(pinia);
},
};
Describe alternatives you've considered
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the docs.
- Read the Contributing Guidelines.
- Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
No labels