This is DRPC documentation site, based on http://nextra.site
It's strongly recommended to use nvm a.k.a Node Version Manager to manage your Node.js versions.
-
Make sure you use Node.js version 18 or higher. You can check this by running
node -vin your terminal/console. -
Make sure you have Yarn installed. You can check this by running
yarn -vin your terminal/console. You can install it by runningnpm install -g yarn. -
Run
yarnto install the dependencies. -
Run
yarn devto start the development server and visit http://localhost:3000/docs
For *-api pages we can easily set common rules for generating metadata in theme.config.tsx.
For other pages, sometimes we need the default values, and sometimes we need custom ones.
Here's how metadata is being set:
- /docs:
metadata set in theme.config.tsx
-- /docs/*-api:
metadata set in theme.config.tsx
--- /docs/*-api/section:
metadata set in theme.config.tsx
---- /docs/*-api/section/method:
metadata is auto-generated by Nextra and based on the page content
-- /docs/any-other-page:
title and description are set via <Meta> component, all other metadata is autogenerated by Nextra
<Meta> component on pages that are not part of the Methods Documentation (i.e. /docs/ethereum-api/ and everything inside) — otherwise the metadata will be missing. See an example of its usage in /howitworks/overview.
This code will cause title go missing, since Nextra will automatically wrap the title in the <p> tag
<Head>
<title>
Understanding dRPC Rate Limiting
</title>
</Head>
So we'll see something like this in the resulting HTML:
<title>
<p>Understanding dRPC Rate Limiting</p>
</title>
Solution: keep the title in one line or use <Meta> component.
This project is licensed under the MIT License.