mirror of
https://github.com/element-plus/element-plus.git
synced 2025-04-06 16:30:35 +08:00
docs: add Playground link in navbar (#19278)
This commit is contained in:
parent
c39f3573f2
commit
b3515ccd5d
@ -1,3 +1,4 @@
|
||||
import { isExternal } from 'vitepress/dist/client/shared'
|
||||
import { ensureLang } from '../utils/lang'
|
||||
import navLocale from '../i18n/pages/sidebar.json'
|
||||
|
||||
@ -12,7 +13,7 @@ function getNav() {
|
||||
activeMatch?: string
|
||||
}[] = Object.values(locales).map((item) => ({
|
||||
...item,
|
||||
link: `${ensureLang(lang)}${item.link}`,
|
||||
link: `${isExternal(item.link) ? '' : ensureLang(lang)}${item.link}`,
|
||||
}))
|
||||
|
||||
return [lang, item]
|
||||
|
@ -13,5 +13,9 @@
|
||||
"text": "Resource",
|
||||
"link": "/resource/index",
|
||||
"activeMatch": "/resource/"
|
||||
},
|
||||
{
|
||||
"text": "Playground",
|
||||
"link": "https://element-plus.run"
|
||||
}
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user