You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ji...@apache.org on 2021/11/09 10:25:06 UTC
[incubator-doris] branch master updated: [Bug] Fix version nav
button loaded multiple times in docs website header (#7062)
This is an automated email from the ASF dual-hosted git repository.
jiafengzheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4c6cbdf [Bug] Fix version nav button loaded multiple times in docs website header (#7062)
4c6cbdf is described below
commit 4c6cbdf4635e48a3465bdfd7302cd3a0faabba42
Author: wangyongfeng <94...@qq.com>
AuthorDate: Tue Nov 9 18:23:44 2021 +0800
[Bug] Fix version nav button loaded multiple times in docs website header (#7062)
* Fix version nav button loaded multiple times
Co-authored-by: 943155336 <wangyongfeng>
Co-authored-by: jiafeng.zhang <zh...@gmail.com>
---
docs/.vuepress/theme/layouts/Layout.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/.vuepress/theme/layouts/Layout.vue b/docs/.vuepress/theme/layouts/Layout.vue
index 5793625..98ad313 100644
--- a/docs/.vuepress/theme/layouts/Layout.vue
+++ b/docs/.vuepress/theme/layouts/Layout.vue
@@ -42,9 +42,9 @@ export default {
.get("/versions.json")
.then(res => {
Object.keys(this.$site.themeConfig.locales).forEach(k => {
- this.$site.themeConfig.locales[k].nav = this.$site.themeConfig.locales[k].nav.concat(
- res.data[k.replace(/\//gi, "")] || []
- )
+ const nav = res.data[k.replace(/\//gi, "")] || []
+ const localNav = nav.filter(item => this.$site.themeConfig.locales[k].nav.every(v => v.text !== item.text))
+ this.$site.themeConfig.locales[k].nav = this.$site.themeConfig.locales[k].nav.concat(localNav)
})
this.renderIndex = 1
})
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org