Rocket Docs
Getting started
Getting started
Rocket Docs is ready for Gatsby v5. New projects will use the new version!
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 |
homePath | - | No | Location of home file |
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`, homePath: `src/home`, 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