This is an automated email from the ASF dual-hosted git repository. kangkaisen pushed a commit to branch branch-0.12 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/branch-0.12 by this push: new 583ac93 [BugFix] Fix navbar not showing on mobile clients(#3419) & image relative path problem (#3427) 583ac93 is described below commit 583ac936023e3990eb5fa47a6f34de819365b537 Author: hffariel <527305...@qq.com> AuthorDate: Wed May 6 11:56:30 2020 +0800 [BugFix] Fix navbar not showing on mobile clients(#3419) & image relative path problem (#3427) --- .travis.yml | 1 + docs/.vuepress/sidebar/en.js | 2 +- docs/.vuepress/theme/components/NavLinks.vue | 56 ---------------------------- docs/.vuepress/theme/layouts/Layout.vue | 23 +++++++++++- 4 files changed, 23 insertions(+), 59 deletions(-) diff --git a/.travis.yml b/.travis.yml index cf4b04f..b84d94e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ before_script: - echo $BRANCH - sed -i 's/base:.*,/base:\"\/'$BRANCH'\/\",/g' .vuepress/config.js - sed -i 's/docsBranch:.*,/docsBranch:\"'$BRANCH'\",/g' .vuepress/config.js + - find ./ -name "*.md" -exec sed -i -e 's/!\[\(.*\)\][(]\(.*\)[)]/<img \:src=\"$withBase\('\''\2'\''\)\" alt=\"\1\">/g' {} \; - rm -rf site-repo script: diff --git a/docs/.vuepress/sidebar/en.js b/docs/.vuepress/sidebar/en.js index c94049e..e1d789c 100644 --- a/docs/.vuepress/sidebar/en.js +++ b/docs/.vuepress/sidebar/en.js @@ -426,7 +426,7 @@ module.exports = [ children: ["debug-tool", "format-code"], }, { - title: "Apache Commnity", + title: "Apache Community", directoryPath: "community/", children: [ "gitter", diff --git a/docs/.vuepress/theme/components/NavLinks.vue b/docs/.vuepress/theme/components/NavLinks.vue deleted file mode 100644 index 66f1023..0000000 --- a/docs/.vuepress/theme/components/NavLinks.vue +++ /dev/null @@ -1,56 +0,0 @@ -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<template> - <div> - <ParentLayout v-if="showNavBar"></ParentLayout> - </div> -</template> -<script> -import ParentLayout from "@parent-theme/components/NavLinks.vue"; -import DropdownLink from "@theme/components/DropdownLink.vue"; -import axios from "axios"; - -export default { - data: () => ({ - showNavBar: false - }), - components: { - ParentLayout - }, - mounted() { - if (this.$site.themeConfig.hasFetchedVersions) return; - this.$site.themeConfig.hasFetchedVersions = true; - axios - .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, "")] || [] - ); - }); - this.showNavBar = true; - }) - .catch(err => { - this.showNavBar = true; - console.log(err); - }); - } -}; -</script> diff --git a/docs/.vuepress/theme/layouts/Layout.vue b/docs/.vuepress/theme/layouts/Layout.vue index 34b0b57..5793625 100644 --- a/docs/.vuepress/theme/layouts/Layout.vue +++ b/docs/.vuepress/theme/layouts/Layout.vue @@ -18,7 +18,7 @@ under the License. --> <template> - <ParentLayout> + <ParentLayout :key="renderIndex"> <Content></Content> <footer slot="page-bottom"> <CustomFooter /> @@ -28,11 +28,30 @@ under the License. <script> import ParentLayout from "@parent-theme/layouts/Layout.vue"; import CustomFooter from "@theme/components/Footer.vue"; +import axios from "axios" export default { components: { ParentLayout, CustomFooter - } + }, + data: () => ({ renderIndex: 0 }), + mounted() { + // fetching versions from asf-site repo + axios + .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, "")] || [] + ) + }) + this.renderIndex = 1 + }) + .catch(err => { + this.renderIndex = 1 + console.log(err) + }) + } }; </script> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org