blob: 2dcd288519f60c8332e9f06efd748bb4c8ccf54a [file] [log] [blame]
/*
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.
*/
import { hopeTheme } from "vuepress-theme-hope";
import { enNavbar, zhNavbar } from "./navbar/index.js";
import { enSidebar, zhSidebar } from "./sidebar/index.js";
export default hopeTheme({
hostname: "https://tsfile.apache.org/",
darkmode: 'toggle',
logo: '/logo.svg',
repo: 'https://github.com/apache/tsfile',
repoLabel: 'GitHub',
repoDisplay: true,
docsRepo: 'https://github.com/apache/tsfile',
docsDir: 'docs/src',
docsBranch: 'develop',
// pure: true,
breadcrumb: false,
lastUpdated: true,
contributors: false,
navbarIcon: false,
navbarLayout: {
start: ['Brand'],
center: [],
end: ['Search', 'Links', 'Language', 'Outlook', 'Repo'],
},
locales: {
"/": {
// navbar
navbar: enNavbar,
// sidebar
sidebar: enSidebar,
footer: "Default footer",
displayFooter: true,
metaLocales: {
editLink: "Found Error? Edit this page on GitHub",
},
},
/**
* Chinese locale config
*/
"/zh/": {
// navbar
navbar: zhNavbar,
// sidebar
sidebar: zhSidebar,
footer: "默认页脚",
displayFooter: true,
// page meta
metaLocales: {
editLink: "发现错误?在 GitHub 上编辑此页",
},
},
},
plugins: {
prismjs: {
light: 'one-dark',
},
components: {
components: ["Badge", "VPCard"],
},
// All features are enabled for demo, only preserve features you need here
mdEnhance: {
align: true,
attrs: true,
codetabs: true,
component: true,
demo: true,
figure: true,
imgLazyload: true,
imgSize: true,
include: true,
mark: true,
stylize: [
{
matcher: "Recommended",
replacer: ({ tag }) => {
if (tag === "em")
return {
tag: "Badge",
attrs: { type: "tip" },
content: "Recommended",
};
},
},
],
sub: true,
sup: true,
tabs: true,
vPre: true,
// install chart.js before enabling it
// chart: true,
// insert component easily
// install echarts before enabling it
// echarts: true,
// install flowchart.ts before enabling it
// flowchart: true,
// gfm requires mathjax-full to provide tex support
// gfm: true,
// install katex before enabling it
// katex: true,
// install mathjax-full before enabling it
// mathjax: true,
// install mermaid before enabling it
// mermaid: true,
// playground: {
// presets: ["ts", "vue"],
// },
// install reveal.js before enabling it
// revealJs: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
// },
// install @vue/repl before enabling it
// vuePlayground: true,
// install sandpack-vue3 before enabling it
// sandpack: true,
},
},
}, {
custom: true
});