Skip to content

drpcorg/drpc-nextra

Repository files navigation

DRPC documentation

This is DRPC documentation site, based on http://nextra.site

Local Development

It's strongly recommended to use nvm a.k.a Node Version Manager to manage your Node.js versions.

  1. Make sure you use Node.js version 18 or higher. You can check this by running node -v in your terminal/console.

  2. Make sure you have Yarn installed. You can check this by running yarn -v in your terminal/console. You can install it by running npm install -g yarn.

  3. Run yarn to install the dependencies.

  4. Run yarn dev to start the development server and visit http://localhost:3000/docs

SEO metadata tips

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

⚠️ It’s important to use the <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.

Troubleshooting

Missing meta title

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.

License

This project is licensed under the MIT License.

About

dRPC docs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 14

Languages