[doc](website)fix SSR bug and add algolia search (#10178)

* fix ssr bug and add algolia search
This commit is contained in:
wangyongfeng
2022-06-16 14:25:46 +08:00
committed by GitHub
parent 3f9436c6a8
commit dad953bc08
5 changed files with 9 additions and 9 deletions

View File

@ -18,8 +18,9 @@ under the License.
*/
const BUILDING_BRANCH = process.env.BRANCH || "";
const ALGOLIA_API_KEY = process.env.ALGOLIA_API_KEY || "";
const ALGOLIA_INDEX_NAME = process.env.ALGOLIA_INDEX_NAME || "";
const ALGOLIA_API_KEY = process.env.ALGOLIA_API_KEY || "b2d5b814db43536017c701c9c19b29bf";
const ALGOLIA_INDEX_NAME = process.env.ALGOLIA_INDEX_NAME || "apache-doris";
const ALGOLIA_APP_ID = process.env.ALGOLIA_APP_ID || "UUKF60R98F";
function convertSidebar(list, path) {
if (list.length > 0) {
@ -39,9 +40,7 @@ function buildAlgoliaSearchConfig(lang) {
return {
apiKey: ALGOLIA_API_KEY,
indexName: ALGOLIA_INDEX_NAME,
algoliaOptions: {
facetFilters: ["lang:" + lang, "version:" + BUILDING_BRANCH],
},
appId: ALGOLIA_APP_ID,
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@ -793,7 +793,7 @@ module.exports = [
"SHOW-TRANSACTION",
"SHOW-TRIGGERS",
"SHOW-TRASH",
"SHOW-USER",
// "SHOW-USER",
"SHOW-VARIABLES",
"SHOW-VIEW",
"SHOW-WARNING",

View File

@ -793,7 +793,7 @@ module.exports = [
"SHOW-TRANSACTION",
"SHOW-TRIGGERS",
"SHOW-TRASH",
"SHOW-USER",
// "SHOW-USER",
"SHOW-VARIABLES",
"SHOW-VIEW",
"SHOW-WARNING",

View File

@ -16,7 +16,7 @@ specific language governing permissions and limitations
under the License.
-->
<template>
<Common :sidebarItems="sidebarItems" v-if="renderComponent" :showModule="recoShowModule">
<Common :sidebarItems="sidebarItems" :showModule="recoShowModule">
<component v-if="$frontmatter.home" :is="homeCom"/>
<Page v-else :sidebar-items="sidebarItems"/>
<Footer v-if="$frontmatter.home" class="footer" />
@ -116,7 +116,8 @@ export default defineComponent({
$page,
$page.regularPath,
$site,
$localePath
$localePath,
instance.renderComponent
)
} else {
return []