forked from marcusolsson/obsidian-plugin-docs
-
Notifications
You must be signed in to change notification settings - Fork 9
/
docusaurus.config.js
146 lines (144 loc) · 3.91 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
(
module.exports = {
title: "Obsidian Plugin Developer Docs",
tagline: "Obsidian Plugin Developer Docs",
url: "https://marcusolsson.github.io",
baseUrl: "/obsidian-plugin-docs/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
organizationName: "marcusolsson", // Usually your GitHub org/user name.
projectName: "obsidian-plugin-docs", // Usually your repo name.
trailingSlash: false,
scripts: [
{
src: "https://plausible.io/js/plausible.js",
defer: true,
"data-domain": "marcus.se.net",
},
],
plugins: [
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
to: "/api/classes/Plugin_2",
from: ["/api/classes/Plugin"],
},
{
to: "/concepts/plugin-anatomy",
from: ["/getting-started/plugin-anatomy"],
},
{
to: "/advanced-guides/react",
from: ["/guides/react"],
},
{
to: "/advanced-guides/svelte",
from: ["/guides/svelte"],
},
],
},
],
],
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
"https://github.com/marcusolsson/obsidian-plugin-docs/edit/main/",
routeBasePath: "/",
remarkPlugins: [
require("mdx-mermaid"),
[require("@docusaurus/remark-plugin-npm2yarn"), { sync: true }],
],
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
themeConfig: {
defaultMode: "dark",
navbar: {
logo: {
alt: "Logo",
src: "img/logo.svg",
},
title: "Obsidian Plugin Developer Docs",
items: [
{
href: "https://buymeacoffee.com/marcusolsson",
label: "Buy me a coffee",
position: "right",
},
{
href: "https://obsidian.md/community",
label: "Community",
position: "right",
},
{
href: "https://github.com/marcusolsson/obsidian-plugin-docs",
label: "GitHub",
position: "right",
},
{
href: "https://marcus.se.net",
label: "Who am I?",
position: "right",
},
],
},
footer: {
links: [
{
title: "Docs",
items: [
{
label: "Create your first plugin",
to: "/getting-started/create-your-first-plugin",
},
],
},
{
title: "Resources",
items: [
{
label: "Community",
href: "https://obsidian.md/community",
},
{
label: "Create Your Own Obsidian Plugin",
href: "https://www.youtube.com/watch?v=9lA-jaMNS0k",
},
{
label: "Obsidian API",
href: "https://github.com/obsidianmd/obsidian-api",
},
],
},
{
title: "More",
items: [
{
label: "GitHub",
href: "https://github.com/marcusolsson/obsidian-plugin-docs",
},
],
},
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
},
}
);