React-Hooks Cheatsheet
Getting started
Getting started
Rocket Docs is ready for Gatsby v3. New projects will use the new version!
If you are still on Gatsby v2, configure it manually.
The best way to start is by using our starter:
npx gatsby new rocketdocs https://github.com/jpedroschmitz/gatsby-starter-rocketdocs
But, if you prefer, you can install and configure manually.
Using Yarn:
yarn add @rocketseat/gatsby-theme-docs
Using NPM:
npm i @rocketseat/gatsby-theme-docs
Theme Options
Key | Default | Required | Description |
---|---|---|---|
basePath | / | No | Root url for all docs |
configPath | config | No | Location of config files |
docsPath | docs | No | The site description for SEO and social (FB, Twitter) tags |
githubUrl | - | - | Deprecated in favor of repositoryUrl |
repositoryUrl | - | No | The complete URL of your repository (supports GitHub, GitLab and Bitbucket). Example: https://github/jpedroschmitz/rocketdocs |
baseDir | - | No | If your Gatsby site does not live in the root of your project directory/git repo, pass the subdirectory name here (ex: docs ) |
withMdx | true | No | If necessary, you can add your own MDX options to the theme. To do so, make sure you turn this option to false and include gatsby-plugin-mdx on your gatsby-config |
branch | main | No | Default branch of the repository |
Note: When adding a BitBucket link on the
repositoryUrl
option, don't add thesrc/<branch>
to it. Example of correct link:
https://bitbucket.org/jpedroschmitz/rocketdocs
Example usage
gatsby-config.js
module.exports = { siteMetadata: { siteTitle: `@rocketseat/gatsby-theme-docs`, defaultTitle: `@rocketseat/gatsby-theme-docs`, siteTitleShort: `gatsby-theme-docs`, siteDescription: `Out of the box Gatsby Theme for creating documentation websites easily and quickly`, siteUrl: `https://rocketdocs.netlify.app`, siteAuthor: `@jpedroschmitz`, siteImage: `/banner.png`, siteLanguage: `en`, themeColor: `#8257E6`, basePath: `/`, }, plugins: [ { resolve: `@rocketseat/gatsby-theme-docs`, options: { basePath: `/`, configPath: `src/config`, docsPath: `src/docs`, repositoryUrl: `https://github.com/jpedroschmitz/rocketdocs`, baseDir: `examples/gatsby-theme-docs`, }, }, ],};
Once you have installed the dependencies you will need to create the navigation and documentation files.
Edit this page on GitHub