Skip to content

Adding i18n to custom navigation component #4150

Answered by brc-dd
gabrielgomeso asked this question in Q&A
Discussion options

You must be logged in to vote

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. 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gabrielgomeso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants