forked from imbhargav5/rooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
205 lines (204 loc) · 5.58 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
module.exports = {
title: "Rooks",
tagline: "Collection of React hooks ⚓ for everyone. ",
url: "https://react-hooks.org",
baseUrl: "/",
organizationName: "imbhargav5",
projectName: "rooks",
scripts: [
{
src: "https://buttons.github.io/buttons.js",
async: true,
defer: true,
},
{
src: "https://cdn.splitbee.io/sb.js",
async: true,
},
{
src: "https://cdn.jsdelivr.net/npm/@widgetbot/crate@3",
async: true,
defer: true,
},
],
favicon:
"https://github.com/imbhargav5/rooks/raw/master/.github/assets/favicon-24x24.png",
customFields: {
users: [
{
caption: "User1",
image: "/img/undraw_open_source.svg",
infoLink: "https://www.facebook.com",
pinned: true,
},
],
repoUrl: "https://github.com/imbhargav5/rooks",
},
onBrokenLinks: "log",
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
showLastUpdateAuthor: true,
showLastUpdateTime: true,
path: "docs",
sidebarPath: require.resolve("./sidebars.json"),
},
blog: {
path: "blog",
},
theme: {
customCss: [require.resolve("./src/css/customTheme.css")],
},
},
],
],
plugins: [
[
"@docusaurus/plugin-client-redirects",
{
createRedirects: function (existingPath) {
if (/use[A-Z]/.test(existingPath)) {
return existingPath
.split(/(?=[A-Z])/)
.join("-")
.toLowerCase();
}
},
},
],
],
themeConfig: {
navbar: {
title: "Rooks",
logo: {
alt: "Site Logo",
src:
"https://github.com/imbhargav5/rooks/raw/master/.github/assets/icon.png",
href: "/", // Default to `siteConfig.baseUrl`.
target: "_self", // By default, this value is calculated based on the `href` attribute (the external link will open in a new tab, all others in the current one).
},
items: [
{
to: "/docs/getting-started/",
label: "Getting Started",
position: "left",
},
{
to: "/docs/",
label: "Documentation",
position: "left",
},
{
href: "https://github.com/imbhargav5/rooks",
label: "GitHub",
position: "right",
},
{
href: "/docs/hooks-list/",
label: "Hooks List",
position: "left",
},
{
href: "/docs/motivation/",
label: "Motivation",
position: "right",
},
// {
// "to": "/help",
// "label": "Help",
// "position": "left"
// },
{
type: "docsVersionDropdown",
position: "right",
dropdownItemsBefore: [],
dropdownItemsAfter: [{ to: "/versions", label: "All versions" }],
},
],
},
image: "img/undraw_online.svg",
footer: {
links: [
{
// Label of the section of these links
title: "Docs",
items: [
{
// Label of the link
label: "Getting Started",
// Client-side routing, used for navigating within the website.
// The baseUrl will be automatically prepended to this value.
to: "docs/getting-started/",
},
{
label: "Motivation",
to: "docs/motivation/",
},
{
label: "Hooks List",
to: "docs/hooks-list/",
},
],
},
{
// Label of the section of these links
title: "Community",
items: [
{
// Label of the link
label: "Stack overflow",
// Client-side routing, used for navigating within the website.
// The baseUrl will be automatically prepended to this value.
to: "https://stackoverflow.com/questions/tagged/rooks",
},
{
label: "Twitter",
to: "https://twitter.com/imbhargav5",
},
],
},
{
title: "More",
items: [
{
label: "GitHub",
to: "https://github.com/imbhargav5/rooks",
},
// {
// html: `
// <!-- Place this tag where you want the button to render. -->
// <a class="github-button" href="https://github.com/imbhargav5/rooks" data-icon="octicon-star" aria-label="Star imbhargav5/rooks on GitHub">Star</a>
// `
// },
{
html: `
<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
</a>`,
},
{
html: `
<a href="https://splitbee.io?ref=badge">
<img src="https://splitbee-cdn.fra1.cdn.digitaloceanspaces.com/static/badge/splitbee-badge.svg" alt="Analytics by Splitbee.io" />
</a>`,
},
],
},
],
copyright: "MIT© 2020 Bhargav Ponnapalli",
logo: {},
},
algolia: {
apiKey: process.env.ALGOLIA_API_KEY,
indexName: "react-hooks",
// Optional: see doc section bellow,
contextual: true,
// searchParameters: {
// facetFilters: ["type:$TYPE"]
// }
//... other Algolia params
},
},
};