feat: upgrade sidebar, remove header, upgrade search
This commit is contained in:
@@ -8,19 +8,17 @@ export default function attacher () {
|
||||
return (tree, { path }) => {
|
||||
let localPath = `/${relative(DOCS_DIR, path)}`
|
||||
let [, locale] = localPath.match(RE_LOCALE) || []
|
||||
if (!locale) {
|
||||
return
|
||||
}
|
||||
|
||||
visit(tree, 'element', node => {
|
||||
let { tagName, properties, properties: { href } } = node
|
||||
let { tagName, properties: { href, ...props } } = node
|
||||
if (tagName !== 'a' || href.match(/^\w+:\/\//)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (locale && href.indexOf('/') === 0) {
|
||||
properties.href = `/${locale}${href}`
|
||||
}
|
||||
let routePath = locale && href.indexOf('/') === 0 ? `/${locale}${href}` : href
|
||||
|
||||
node.tagName = 'nuxt-link'
|
||||
node.properties = { ...props, to: routePath }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# VEUI
|
||||
|
||||
:::oss-badges
|
||||
[<img alt="VEUI on GitHub" src="https://badgen.net/badge/-/VEUI?label=GitHub" width="85.2" height="20">](https://github.com/ecomfe/veui) [<img alt="VEUI on CircleCI" src="https://badgen.net/circleci/github/ecomfe/veui?label=CircleCI" width="105.1" height="20">](https://circleci.com/gh/ecomfe/veui) [<img alt="VEUI on npm" src="https://badgen.net/npm/v/veui" width="133.5" height="20">](https://www.npmjs.com/package/veui)
|
||||
[<img alt="VEUI on CircleCI" src="https://badgen.net/circleci/github/ecomfe/veui?label=CircleCI&cache=300" height="20">](https://circleci.com/gh/ecomfe/veui) [<img alt="VEUI on npm" src="https://badgen.net/npm/v/veui?cache=300" height="20">](https://www.npmjs.com/package/veui)
|
||||
:::
|
||||
|
||||
> VEUI is an enterprise UI component library, based on [Vue.js](https://vuejs.org).
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# VEUI
|
||||
|
||||
:::oss-badges
|
||||
[<img alt="VEUI on GitHub" src="https://badgen.net/badge/-/VEUI?label=GitHub" width="85.2" height="20">](https://github.com/ecomfe/veui) [<img alt="VEUI on CircleCI" src="https://badgen.net/circleci/github/ecomfe/veui?label=CircleCI" width="105.1" height="20">](https://circleci.com/gh/ecomfe/veui) [<img alt="VEUI on npm" src="https://badgen.net/npm/v/veui" width="133.5" height="20">](https://www.npmjs.com/package/veui)
|
||||
[<img alt="VEUI on CircleCI" src="https://badgen.net/circleci/github/ecomfe/veui?label=CircleCI&cache=300" height="20">](https://circleci.com/gh/ecomfe/veui) [<img alt="VEUI on npm" src="https://badgen.net/npm/v/veui?cache=300" height="20">](https://www.npmjs.com/package/veui)
|
||||
:::
|
||||
|
||||
> VEUI 是一套基于 [Vue.js](https://vuejs.org) 的企业级应用组件库。
|
||||
|
Reference in New Issue
Block a user