Adding i18n to custom navigation component #4150
-
I've managed to create a custom component and add it to my theme (created a |
Beta Was this translation helpful? Give feedback.
Answered by
brc-dd
Aug 20, 2024
Replies: 1 comment
-
Just use import { useData } from 'vitepress'
import type YourThemeConfig from './some/path'
const { theme } = useData<YourThemeConfig>() // <-- theme is read-only ref here. You just need to render theme.value.nav or something in your header and vue will track the rest. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gabrielgomeso
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just use