Skip to content

Switch docs back to openrpc v2 #667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open

Conversation

acolytec3
Copy link
Contributor

@acolytec3 acolytec3 commented Jun 18, 2025

This replaces the #653 docs project with the OpenRPC v2 docs generator so reverts back to the Gatsby build for now, based on #660.

Major changes

  • Replace docusaurus docs builder with OpenRPC v2 generator (i.e. gatsby)
  • Remove extraneous docusaurus artifacts
  • Adds gatsby-config that is copied to gatsby build and adds menu items for our docs
  • Moves tests/README.md to docs/reference/tests.md so it is accessible from docs
  • Copies repo README.md to docs/reference/quickstart.md so accessible from docs

Miscellaneous

edit after build

add contents write

add path-prefix

use peaceiris

rework install setup

rebuild gatsby again

update config and deployment

Add actions bot

back to peace iris
@acolytec3
Copy link
Contributor Author

It now renders like this:

image

@acolytec3
Copy link
Contributor Author

We should be sure to squash all this to one commit if/when merged.

@bomanaps
Copy link

So the speccheck -v is failing not your fault but from the rpctestgen it has to do with this invalid result /eth_simulateV1/ethSimulate-add-more-non-defined-BlockStateCalls-than-fit-but-now-with-fit [I#] [S#] doesn't validate with file:///workspace/execution-apis/eth_simulateV1.result# [I#] [S#/type] expected object, but got array I will open an issue and try fixing that so the CI can run properly.

Copy link

@zcstarr zcstarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think overall looks good jsut a few things around the package use and CI that will clean things up. I also had a qustion about using mjs in this repo for the most part. Generator uses the .js here but I think maybe there's an opp to switch back to mjs as it'll be more future proof. I'll test this when I bump the generator version

uses: peaceiris/actions-gh-pages@v4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be cool if we could stay on actions I think for long term usability

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean here. Can you clarify?

package.json Outdated
"lint": "npm run build:spec && node scripts/validate.mjs && node scripts/graphql-validate.mjs",
"build:spec": "node scripts/build.js",
"build:docs": "npm run generate-clients && npm run build:docs:gatsby",
"build:docs:gatsby": "cp docs/config/gatsby-config.js build/docs/gatsby && cd build/docs/gatsby && npm install && gatsby build --prefix-paths",
Copy link

@zcstarr zcstarr Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will be cleaned up via the generator changes that will allow you to spec paths in the config.json

siteUrl: process.env.GITHUB_REPOSITORY
? `https://${process.env.GITHUB_REPOSITORY.split('/')[0]}.github.io/execution-apis`
: 'https://ethereum.github.io/execution-apis', // fallback for local development
logoUrl: 'https://raw.githubusercontent.com/open-rpc/design/master/icons/open-rpc-logo-noText/open-rpc-logo-noText%20(PNG)/256x256.png',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's an eth icon or one for execution apis we might drop that here.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @bomanaps mentioned it earlier there seems to be a formatting issue with the markdown table here. We might consider switching to .mdx to give these a little more spacing or container

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be but that's really beyond the scope of this PR (which is intended to be isolated to migrating back to OpenRPC generator). Ideally that sort of stuff would be addressed separately.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please take a look at this @zcstarr acolytec3#5

zcstarr and others added 5 commits June 27, 2025 21:27
This change allows for documentation assets to be copied by the
generator into the proper build locations, eliminating the need
for manual copy.
update support for latest generator
@acolytec3
Copy link
Contributor Author

Just noticed there were still merge conflicts. Will clean them up.

@lightclient
Copy link
Member

Trying to run this locally, but it fails to generate with node version 22.17.0.

npm run build:docs:gatsby

> [email protected] build:docs:gatsby
> cd build/docs/gatsby && npm install && gatsby build --prefix-paths

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"^18.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.0.0-0" from [email protected]
npm error node_modules/react-split-pane
npm error   react-split-pane@"^0.1.87" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/matt/.npm/_logs/2025-07-07T16_04_53_481Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/matt/.npm/_logs/2025-07-07T16_04_53_481Z-debug-0.log

@acolytec3
Copy link
Contributor Author

Trying to run this locally, but it fails to generate with node version 22.17.0.

npm run build:docs:gatsby

> [email protected] build:docs:gatsby
> cd build/docs/gatsby && npm install && gatsby build --prefix-paths

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"^18.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.0.0-0" from [email protected]
npm error node_modules/react-split-pane
npm error   react-split-pane@"^0.1.87" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/matt/.npm/_logs/2025-07-07T16_04_53_481Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/matt/.npm/_logs/2025-07-07T16_04_53_481Z-debug-0.log

Can you document what steps you use to hit this issue?

I deleted build and node-modules and then do

npm i
npm run build
npm run build:docs

And everything compiles and build on node 22.17.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants