pomerium/docs/.vuepress/theme/index.js
Bobby DeSimone 0a530fbea2
docs: update site ui
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
2019-08-03 22:28:18 -07:00

52 lines
1.1 KiB
JavaScript

const path = require("path");
// Theme API.
module.exports = (options, ctx) => ({
alias() {
const { themeConfig, siteConfig } = ctx;
// resolve algolia
const isAlgoliaSearch =
themeConfig.algolia ||
Object.keys((siteConfig.locales && themeConfig.locales) || {}).some(
base => themeConfig.locales[base].algolia
);
return {
"@AlgoliaSearchBox": isAlgoliaSearch
? path.resolve(__dirname, "components/AlgoliaSearchBox.vue")
: path.resolve(__dirname, "noopModule.js")
};
},
plugins: [
["@vuepress/active-header-links", options.activeHeaderLinks],
"@vuepress/search",
"@vuepress/plugin-nprogress",
[
"container",
{
type: "tip",
defaultTitle: {
"/zh/": "提示"
}
}
],
[
"container",
{
type: "warning",
defaultTitle: {
"/zh/": "注意"
}
}
],
[
"container",
{
type: "danger",
defaultTitle: {
"/zh/": "警告"
}
}
]
]
});