Skip to content

Commit 9c445ad

Browse files
refactor: undo docusaurus.config.ts prettier changes
1 parent f647dfa commit 9c445ad

File tree

2 files changed

+212
-177
lines changed

2 files changed

+212
-177
lines changed

docusaurus.config.ts

Lines changed: 160 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ const config: Config = {
3333
docs: {
3434
breadcrumbs: false,
3535
editUrl: editUrlFunction,
36-
exclude: [
37-
'adrs/README.md',
38-
'adrs/0000-architectural-decision-records.md',
39-
'adrs/template.md',
40-
],
36+
exclude: ['adrs/README.md', 'adrs/0000-architectural-decision-records.md', 'adrs/template.md'],
4137
numberPrefixParser: false,
4238
path: 'docs',
4339
beforeDefaultRemarkPlugins: [codeBlockSnippetsPlugin],
@@ -46,8 +42,8 @@ const config: Config = {
4642
[
4743
require('@docusaurus/remark-plugin-npm2yarn'),
4844
{
49-
sync: true, // Sync the tab page across the whole docs website.
50-
converters: ['pnpm', 'yarn'], // Package managers to use.
45+
sync: true, // Sync the tab page across the whole docs website.
46+
converters:['pnpm','yarn'], // Package managers to use.
5147
},
5248
],
5349
],
@@ -70,11 +66,10 @@ const config: Config = {
7066
// Copy tags into sidebar props so we can print tags in DocCard
7167
parseFrontMatter: async (params) => {
7268
const frontmatter = await params.defaultParseFrontMatter(params);
73-
frontmatter.frontMatter.sidebar_custom_props ??= {};
69+
frontmatter.frontMatter.sidebar_custom_props ??= {}
7470
// @ts-expect-error Wrong type
75-
frontmatter.frontMatter.sidebar_custom_props.tags =
76-
frontmatter.frontMatter.tags;
77-
return frontmatter;
71+
frontmatter.frontMatter.sidebar_custom_props.tags = frontmatter.frontMatter.tags
72+
return frontmatter
7873
},
7974
hooks: {
8075
onBrokenMarkdownLinks: process.env.NETLIFY ? 'warn' : 'throw',
@@ -89,9 +84,9 @@ const config: Config = {
8984
return {
9085
resolve: {
9186
symlinks: false,
92-
},
87+
}
9388
};
94-
},
89+
}
9590
};
9691
},
9792
[
@@ -133,7 +128,10 @@ const config: Config = {
133128
],
134129
},
135130
],
136-
['@docusaurus/plugin-client-redirects', redirectsOptions],
131+
[
132+
'@docusaurus/plugin-client-redirects',
133+
redirectsOptions,
134+
],
137135
],
138136
themes: [
139137
[
@@ -145,140 +143,141 @@ const config: Config = {
145143
} satisfies import('@easyops-cn/docusaurus-search-local').PluginOptions,
146144
],
147145
],
148-
themeConfig: {
149-
navbar: {
150-
logo: {
151-
alt: 'Oasis Docs',
152-
src: 'img/logo.svg',
153-
srcDark: 'img/logo_dark.svg', // Workaround for browsers that don't support @media (prefers-color-scheme: dark) in external SVGs.
154-
// Uncomment src and style below to enable christmas mode ;)
155-
//src: 'img/logo_christmas.svg',
156-
//srcDark: 'img/logo_christmas_dark.svg',
157-
//style: {marginTop: '-13px', marginLeft: '-10px', height: '3rem'},
158-
},
159-
items: [
160-
{
161-
label: 'Build',
162-
to: '/build/',
163-
activeBaseRegex: '/build/',
164-
position: 'left',
165-
},
166-
{
167-
label: 'Learn',
168-
to: '/general/',
169-
activeBaseRegex: '/general/',
170-
position: 'left',
171-
},
172-
{
173-
label: 'Get Involved',
174-
to: '/get-involved/',
175-
position: 'left',
176-
activeBaseRegex: `/get-involved/`,
177-
},
178-
{
179-
label: 'Run Node',
180-
to: '/node/',
181-
activeBaseRegex: '/node/',
182-
position: 'left',
183-
},
184-
{
185-
label: 'Develop Core',
186-
to: '/core/',
187-
position: 'left',
188-
activeBaseRegex: `/core/`,
189-
},
190-
{
191-
href: 'https://github.com/oasisprotocol',
192-
position: 'right',
193-
className: 'header-github-link',
194-
title: 'GitHub repository',
195-
'aria-label': 'GitHub repository',
196-
},
197-
{
198-
href: 'https://oasis.net/',
199-
position: 'right',
200-
className: 'header-www-link',
201-
title: 'Oasis website',
202-
'aria-label': 'Oasis website',
203-
},
204-
],
205-
},
206-
footer: {
207-
links: [
208-
{
209-
title: 'Tools',
210-
items: [
211-
{
212-
label: 'Explorer',
213-
to: 'https://explorer.oasis.io',
214-
},
215-
{
216-
label: 'Wallet',
217-
to: 'https://wallet.oasis.io',
218-
},
219-
{
220-
label: 'CLI',
221-
to: 'https://github.com/oasisprotocol/cli',
222-
},
223-
{
224-
label: 'Status',
225-
to: 'https://status.oasis.io',
226-
},
227-
],
228-
},
229-
{
230-
title: 'Build',
231-
items: [
232-
{
233-
label: 'Testnet Faucet',
234-
to: 'https://faucet.testnet.oasis.io/',
235-
},
236-
{
237-
label: 'Playground',
238-
to: 'https://playground.oasis.io/',
239-
},
240-
{
241-
label: 'API',
242-
to: 'https://api.docs.oasis.io/',
243-
},
244-
],
245-
},
246-
{
247-
title: 'Node',
248-
items: [
249-
{
250-
label: 'Mainnet',
251-
to: 'node/network/mainnet',
252-
},
253-
{
254-
label: 'Testnet',
255-
to: 'node/network/testnet',
256-
},
257-
],
146+
themeConfig:
147+
{
148+
navbar: {
149+
logo: {
150+
alt: 'Oasis Docs',
151+
src: 'img/logo.svg',
152+
srcDark: 'img/logo_dark.svg', // Workaround for browsers that don't support @media (prefers-color-scheme: dark) in external SVGs.
153+
// Uncomment src and style below to enable christmas mode ;)
154+
//src: 'img/logo_christmas.svg',
155+
//srcDark: 'img/logo_christmas_dark.svg',
156+
//style: {marginTop: '-13px', marginLeft: '-10px', height: '3rem'},
258157
},
259-
{
260-
title: 'Community',
261-
items: [
262-
{
263-
label: 'Discord',
264-
to: 'https://oasis.io/discord',
265-
},
266-
{
267-
label: 'Telegram',
268-
to: 'https://t.me/oasisprotocolcommunity',
269-
},
270-
{
271-
label: 'Youtube',
272-
to: 'https://www.youtube.com/channel/UC35UFPcZ2F1wjPxhPrSsESQ',
273-
},
274-
{
275-
label: 'GitHub',
276-
to: 'https://github.com/oasisprotocol',
277-
},
278-
],
279-
},
280-
],
281-
copyright: `
158+
items: [
159+
{
160+
label: 'Build',
161+
to: '/build/',
162+
activeBaseRegex: '/build/',
163+
position: 'left',
164+
},
165+
{
166+
label: 'Learn',
167+
to: '/general/',
168+
activeBaseRegex: '/general/',
169+
position: 'left',
170+
},
171+
{
172+
label: 'Get Involved',
173+
to: '/get-involved/',
174+
position: 'left',
175+
activeBaseRegex: `/get-involved/`,
176+
},
177+
{
178+
label: 'Run Node',
179+
to: '/node/',
180+
activeBaseRegex: '/node/',
181+
position: 'left',
182+
},
183+
{
184+
label: 'Develop Core',
185+
to: '/core/',
186+
position: 'left',
187+
activeBaseRegex: `/core/`,
188+
},
189+
{
190+
href: 'https://github.com/oasisprotocol',
191+
position: 'right',
192+
className: 'header-github-link',
193+
title: 'GitHub repository',
194+
'aria-label': 'GitHub repository',
195+
},
196+
{
197+
href: 'https://oasis.net/',
198+
position: 'right',
199+
className: 'header-www-link',
200+
title: 'Oasis website',
201+
'aria-label': 'Oasis website',
202+
},
203+
],
204+
},
205+
footer: {
206+
links: [
207+
{
208+
title: 'Tools',
209+
items: [
210+
{
211+
label: 'Explorer',
212+
to: 'https://explorer.oasis.io',
213+
},
214+
{
215+
label: 'Wallet',
216+
to: 'https://wallet.oasis.io',
217+
},
218+
{
219+
label: 'CLI',
220+
to: 'https://github.com/oasisprotocol/cli',
221+
},
222+
{
223+
label: 'Status',
224+
to: 'https://status.oasis.io',
225+
},
226+
],
227+
},
228+
{
229+
title: 'Build',
230+
items: [
231+
{
232+
label: 'Testnet Faucet',
233+
to: 'https://faucet.testnet.oasis.io/',
234+
},
235+
{
236+
label: 'Playground',
237+
to: 'https://playground.oasis.io/',
238+
},
239+
{
240+
label: 'API',
241+
to: 'https://api.docs.oasis.io/',
242+
},
243+
],
244+
},
245+
{
246+
title: 'Node',
247+
items: [
248+
{
249+
label: 'Mainnet',
250+
to: 'node/network/mainnet',
251+
},
252+
{
253+
label: 'Testnet',
254+
to: 'node/network/testnet',
255+
},
256+
],
257+
},
258+
{
259+
title: 'Community',
260+
items: [
261+
{
262+
label: 'Discord',
263+
to: 'https://oasis.io/discord',
264+
},
265+
{
266+
label: 'Telegram',
267+
to: 'https://t.me/oasisprotocolcommunity',
268+
},
269+
{
270+
label: 'Youtube',
271+
to: 'https://www.youtube.com/channel/UC35UFPcZ2F1wjPxhPrSsESQ',
272+
},
273+
{
274+
label: 'GitHub',
275+
to: 'https://github.com/oasisprotocol',
276+
},
277+
],
278+
},
279+
],
280+
copyright: `
282281
<p xmlns:cc="http://creativecommons.org/ns#" >Copyright © ${new Date().getFullYear()}
283282
by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://oasis.net">
284283
Oasis Protocol Foundation</a>. We <a href="https://oasisprotocol.org/privacy-policy" target="_blank" rel="noopener noreferrer">respect your privacy</a>.
@@ -292,20 +291,20 @@ This does not include the Oasis software and the code examples, both of which ar
292291
licensed under <a href="https://www.apache.org/licenses/LICENSE-2.0"
293292
target="_blank" rel="license noopener noreferrer" style="display:inline-block;">
294293
Apache 2.0</a>. Built with &#x2665; and Docusaurus.</p>`,
295-
},
296-
prism: {
297-
theme: prismThemes.github,
298-
darkTheme: prismThemes.dracula,
299-
additionalLanguages: ['diff', 'rust', 'solidity', 'toml', 'ini'],
300-
},
301-
colorMode: {
302-
respectPrefersColorScheme: true,
303-
},
304-
} satisfies Preset.ThemeConfig,
305-
customFields: {
306-
NODE_ENV: process.env.NODE_ENV,
307-
REACT_APP_FATHOM_SITE_ID: process.env.REACT_APP_FATHOM_SITE_ID,
308-
},
294+
},
295+
prism: {
296+
theme: prismThemes.github,
297+
darkTheme: prismThemes.dracula,
298+
additionalLanguages: ['diff', 'rust', 'solidity', 'toml', 'ini'],
299+
},
300+
colorMode: {
301+
respectPrefersColorScheme: true,
302+
},
303+
} satisfies Preset.ThemeConfig,
304+
customFields: {
305+
NODE_ENV: process.env.NODE_ENV,
306+
REACT_APP_FATHOM_SITE_ID: process.env.REACT_APP_FATHOM_SITE_ID,
307+
}
309308
};
310309

311310
module.exports = config;

0 commit comments

Comments
 (0)