|
| 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://ethereum.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: 'ethereum', // 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 | + docs: { |
| 41 | + routeBasePath: '/', |
| 42 | + openrpc: { |
| 43 | + openrpcDocument: './refs-openrpc.json', |
| 44 | + path: 'reference', |
| 45 | + sidebarLabel: 'JSON-RPC', |
| 46 | + }, |
| 47 | + sidebarPath: './sidebars.ts', |
| 48 | + path: './docs', |
| 49 | + }, |
| 50 | + blog: false, |
| 51 | + theme: { |
| 52 | + customCss: './css/custom.css', |
| 53 | + }, |
| 54 | + } satisfies Preset.Options, |
| 55 | + ], |
| 56 | + ], |
| 57 | + |
| 58 | + themeConfig: { |
| 59 | + // Replace with your project's social card |
| 60 | + image: 'img/docusaurus-social-card.jpg', |
| 61 | + navbar: { |
| 62 | + title: 'Execution APIs', |
| 63 | + // logo: { |
| 64 | + // alt: 'My Site Logo', |
| 65 | + // src: 'img/logo.svg', |
| 66 | + // }, |
| 67 | + items: [ |
| 68 | + { |
| 69 | + type: 'docSidebar', |
| 70 | + sidebarId: 'referenceSidebar', |
| 71 | + position: 'left', |
| 72 | + label: 'API Reference', |
| 73 | + }, |
| 74 | + { |
| 75 | + href: 'https://github.com/ethereum/execution-apis', |
| 76 | + label: 'GitHub', |
| 77 | + position: 'right', |
| 78 | + }, |
| 79 | + ], |
| 80 | + }, |
| 81 | + footer: { |
| 82 | + style: 'dark', |
| 83 | + links: [ |
| 84 | + { |
| 85 | + title: 'More', |
| 86 | + items: [ |
| 87 | + { |
| 88 | + label: 'GitHub', |
| 89 | + href: 'https://github.com/ethereum/execution-apis', |
| 90 | + }, |
| 91 | + ], |
| 92 | + }, |
| 93 | + ], |
| 94 | + copyright: `Copyright and related rights waived via CC0.`, |
| 95 | + }, |
| 96 | + prism: { |
| 97 | + theme: prismThemes.github, |
| 98 | + darkTheme: prismThemes.dracula, |
| 99 | + }, |
| 100 | + } satisfies Preset.ThemeConfig, |
| 101 | +}; |
| 102 | + |
| 103 | +export default config; |
0 commit comments