آکادمی صدرا

Getting started

Getting started

The best way to start is by using our starter:

gatsby new rocket-docs https://github.com/rocketseat/gatsby-starter-rocket-docs

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

KeyDefaultRequiredDescription
basePath/NoRoot url for all docs
configPathconfigNoLocation of config files
docsPathdocsNoThe site description for SEO and social (FB, Twitter) tags
githubUrl-NoThe complete URL of your repository. For example: https://github/rocketseat/gatsby-themes
baseDir-NoIf your Gatsby site does not live in the root of your project directory/git repo, pass the subdirectory name here (ex: docs)
withMdxtrueNoIf 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
branchmasterNoDefault branch of the repository

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.com`,
siteAuthor: `@rocketseat`,
siteImage: `/banner.png`,
siteLanguage: `en`,
themeColor: `#8257E6`,
basePath: `/`,
},
plugins: [
{
resolve: `@rocketseat/gatsby-theme-docs`,
options: {
basePath: `/`,
configPath: `src/config`,
docsPath: `src/docs`,
githubUrl: `https://github.com/rocketseat/gatsby-themes`,
baseDir: `examples/gatsby-theme-docs`,
},
},
],
};

Once you have installed the dependencies you will need to create the navigation and documentation files.

این صفحه در گیت هاب

فهرست مطالب