Skip to content

Commit 909208b

Browse files
committed
add docusaurus
1 parent aed9d04 commit 909208b

23 files changed

+23467
-0
lines changed

docs/reference/intro.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
### API Spec

site/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

site/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

site/docs/reference/intro.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
slug: /
3+
sidebar_position: 1
4+
---
5+
6+
# Introduction
7+
8+
Welcome to the Ethereum Execution APIs documentation. This documentation provides comprehensive information about the JSON-RPC APIs provided by Ethereum 1.0 clients.
9+
10+
## What are Execution APIs?
11+
12+
Execution APIs are the set of JSON-RPC endpoints that allow applications to interact with Ethereum nodes. These APIs enable developers to:
13+
14+
- Query blockchain data
15+
- Send transactions
16+
- Interact with smart contracts
17+
- Monitor network status
18+
- And much more
19+
20+
## Getting Started
21+
22+
To get started with the Execution APIs:
23+
24+
1. Choose an Ethereum client implementation
25+
2. Set up your development environment
26+
3. Connect to an Ethereum node
27+
4. Start making JSON-RPC calls
28+
29+
## API Categories
30+
31+
The Execution APIs are organized into several categories:
32+
33+
- Core APIs
34+
- Account APIs
35+
- Network APIs
36+
- Debug APIs
37+
- Trace APIs
38+
39+
Each category serves specific purposes and provides different functionalities for interacting with the Ethereum network.
40+
41+
## Contributing
42+
43+
We welcome contributions to improve this documentation. Please see our [Making Changes](/docs/making-changes) guide for more information on how to contribute.
File renamed without changes.

site/docusaurus.config.ts

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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: 'My Site',
9+
tagline: 'Dinosaurs are cool',
10+
favicon: 'img/favicon.ico',
11+
12+
// Set the production url of your site here
13+
url: 'https://your-docusaurus-site.example.com',
14+
// Set the /<baseUrl>/ pathname under which your site is served
15+
// For GitHub pages deployment, it is often '/<projectName>/'
16+
baseUrl: '/',
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+
23+
onBrokenLinks: 'throw',
24+
onBrokenMarkdownLinks: 'warn',
25+
26+
// Even if you don't use internationalization, you can use this field to set
27+
// useful metadata like html lang. For example, if your site is Chinese, you
28+
// may want to replace "en" with "zh-Hans".
29+
i18n: {
30+
defaultLocale: 'en',
31+
locales: ['en'],
32+
},
33+
34+
presets: [
35+
[
36+
'@metamask/docusaurus-openrpc/dist/preset',
37+
/** @type {import('@metamask/docusaurus-openrpc/dist/preset').Options} */
38+
{
39+
docs: {
40+
routeBasePath: '/',
41+
openrpc: {
42+
openrpcDocument: '../refs-openrpc.json',
43+
path: 'Reference',
44+
sidebarLabel: 'JSON-RPC',
45+
},
46+
sidebarPath: './sidebars.ts',
47+
// Please change this to your repo.
48+
// Remove this to remove the "edit this page" links.
49+
editUrl:
50+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
51+
},
52+
blog: false,
53+
theme: {
54+
customCss: './src/css/custom.css',
55+
},
56+
} satisfies Preset.Options,
57+
],
58+
],
59+
60+
themeConfig: {
61+
// Replace with your project's social card
62+
image: 'img/docusaurus-social-card.jpg',
63+
navbar: {
64+
title: 'Execution APIs',
65+
logo: {
66+
alt: 'My Site Logo',
67+
src: 'img/logo.svg',
68+
},
69+
items: [
70+
{
71+
type: 'docSidebar',
72+
sidebarId: 'referenceSidebar',
73+
position: 'left',
74+
label: 'API Reference',
75+
},
76+
{
77+
href: 'https://github.com/facebook/docusaurus',
78+
label: 'GitHub',
79+
position: 'right',
80+
},
81+
],
82+
},
83+
footer: {
84+
style: 'dark',
85+
links: [
86+
{
87+
title: 'Docs',
88+
items: [
89+
{
90+
label: 'Tutorial',
91+
to: '/docs/intro',
92+
},
93+
],
94+
},
95+
{
96+
title: 'More',
97+
items: [
98+
{
99+
label: 'GitHub',
100+
href: 'https://github.com/facebook/docusaurus',
101+
},
102+
],
103+
},
104+
],
105+
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
106+
},
107+
prism: {
108+
theme: prismThemes.github,
109+
darkTheme: prismThemes.dracula,
110+
},
111+
} satisfies Preset.ThemeConfig,
112+
};
113+
114+
export default config;

0 commit comments

Comments
 (0)