-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocusaurus.config.js
84 lines (78 loc) · 2.47 KB
/
docusaurus.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const math = require("remark-math");
const katex = require("rehype-katex");
const npm2yarn = require("@docusaurus/remark-plugin-npm2yarn");
/** @type {import("@docusaurus/types").Config} */
const config = {
title: "docusaurus-theme-vanilla",
url: "https://jc-verse.github.io",
baseUrl: "/docusaurus-theme-vanilla/",
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
stylesheets: [
{
href: "/docusaurus-theme-vanilla/katex/katex.min.css",
type: "text/css",
},
],
// Before we have validation, we have to provide everything
/** @type {import("@docusaurus/theme-common").ThemeConfig} */
themeConfig: {
docs: {
versionPersistence: "localStorage",
sidebar: {
autoCollapseCategories: true,
},
},
},
plugins: [
[
"content-docs",
/** @type {import("@docusaurus/plugin-content-docs").Options} */
({
path: "docs",
sidebarPath: "sidebars.js",
editUrl: ({ locale, docPath }) => {
if (locale !== "en")
return `https://crowdin.com/project/docusaurus-v2/${locale}`;
// We want users to submit doc updates to the upstream/next version!
// Otherwise we risk losing the update on the next release.
const nextVersionDocsDirPath = "docs";
return `https://github.com/facebook/docusaurus/edit/main/website/${nextVersionDocsDirPath}/${docPath}`;
},
showLastUpdateAuthor: true,
showLastUpdateTime: true,
remarkPlugins: [math, [npm2yarn, { sync: true }]],
rehypePlugins: [katex],
versions: {
current: {
label: `2.0.0-beta.22 🚧`,
},
},
}),
],
[
"content-blog",
/** @type {import("@docusaurus/plugin-content-blog").Options} */
({
path: "blog",
editUrl: ({ locale, blogDirPath, blogPath }) => {
if (locale !== "en")
return `https://crowdin.com/project/docusaurus-v2/${locale}`;
return `https://github.com/facebook/docusaurus/edit/main/website/${blogDirPath}/${blogPath}`;
},
postsPerPage: 5,
feedOptions: {
type: "all",
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc.`,
},
blogSidebarCount: "ALL",
blogSidebarTitle: "All our posts",
}),
],
"content-pages",
"ideal-image",
],
themes: [require.resolve("./theme/index.js")],
};
module.exports = config;