Skip to content

Commit 929cd81

Browse files
committed
make ESM/CJS stuff play nice
1 parent e4a3ddd commit 929cd81

File tree

9 files changed

+11252
-37696
lines changed

9 files changed

+11252
-37696
lines changed

docusaurus.config.mts

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
import { themes as prismThemes } from 'prism-react-renderer';
2+
import type { Config } from '@docusaurus/types';
3+
import type * as Preset from '@metamask/docusaurus-openrpc/dist/preset';
4+
5+
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
6+
7+
const config: Config = {
8+
title: 'Ethereum Execution APIs',
9+
tagline: 'A JSON-RPC specification for Ethereum execution clients',
10+
favicon: 'img/favicon.ico',
11+
12+
// Set the production url of your site here
13+
url: 'https://acolytec3.github.io',
14+
// Set the /<baseUrl>/ pathname under which your site is served
15+
// For GitHub pages deployment, it is often '/<projectName>/'
16+
baseUrl: '/execution-apis/',
17+
18+
// GitHub pages deployment config.
19+
// If you aren't using GitHub pages, you don't need these.
20+
organizationName: 'acolytec3', // Usually your GitHub org/user name.
21+
projectName: 'execution-apis', // Usually your repo name.
22+
deploymentBranch: 'gh-pages',
23+
24+
onBrokenLinks: 'warn',
25+
onBrokenMarkdownLinks: 'warn',
26+
27+
// Even if you don't use internationalization, you can use this field to set
28+
// useful metadata like html lang. For example, if your site is Chinese, you
29+
// may want to replace "en" with "zh-Hans".
30+
i18n: {
31+
defaultLocale: 'en',
32+
locales: ['en'],
33+
},
34+
35+
presets: [
36+
[
37+
'@metamask/docusaurus-openrpc/dist/preset',
38+
/** @type {import('@metamask/docusaurus-openrpc/dist/preset').Options} */
39+
{
40+
// @ts-ignore - missing 'id' field that breaks everything when I add it
41+
docs: {
42+
routeBasePath: '/',
43+
openrpc: {
44+
openrpcDocument: './refs-openrpc.json',
45+
path: 'reference',
46+
sidebarLabel: 'JSON-RPC',
47+
},
48+
sidebarPath: './sidebars.ts',
49+
path: './docs',
50+
},
51+
blog: false,
52+
theme: {
53+
customCss: './src/css/custom.css',
54+
},
55+
} satisfies Preset.Options,
56+
],
57+
],
58+
59+
themeConfig: {
60+
// Replace with your project's social card
61+
image: 'img/docusaurus-social-card.jpg',
62+
navbar: {
63+
title: 'Execution APIs',
64+
// logo: {
65+
// alt: 'My Site Logo',
66+
// src: 'img/logo.svg',
67+
// },
68+
items: [
69+
{
70+
type: 'docSidebar',
71+
sidebarId: 'referenceSidebar',
72+
position: 'left',
73+
label: 'API Reference',
74+
},
75+
{
76+
href: 'https://github.com/facebook/docusaurus',
77+
label: 'GitHub',
78+
position: 'right',
79+
},
80+
],
81+
},
82+
footer: {
83+
style: 'dark',
84+
links: [
85+
{
86+
title: 'More',
87+
items: [
88+
{
89+
label: 'GitHub',
90+
href: 'https://github.com/facebook/docusaurus',
91+
},
92+
],
93+
},
94+
],
95+
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
96+
},
97+
prism: {
98+
theme: prismThemes.github,
99+
darkTheme: prismThemes.dracula,
100+
},
101+
} satisfies Preset.ThemeConfig,
102+
};
103+
104+
export default config;

docusaurus.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const config: Config = {
3737
'@metamask/docusaurus-openrpc/dist/preset',
3838
/** @type {import('@metamask/docusaurus-openrpc/dist/preset').Options} */
3939
{
40+
// @ts-ignore
4041
docs: {
4142
routeBasePath: '/',
4243
openrpc: {

0 commit comments

Comments
 (0)