This API Reference documents all the available configurations for gatsby-config.js.

npX install-peerdeps @availity/gatsby-theme-docs

Default Theme Options

We include an export for the default theme options in the case you don't want to explicity put them there yourself.


You can simply import the file and spread its contents onto the theme options before overwriting with your own if you are unsure what all you have missed.

theme-options.js

const navConfig = {
'/availity-workflow': {
text: 'Getting Started',
matchRegex: '^/availity-workflow',
},
'/availity-uikit': {
text: 'UI Kit',
matchRegex: '^/availity-uikit',
},
'/availity-react': {
text: 'Components',
matchRegex: '^/availity-react',
},
'/sdk-js': {
text: 'Resources',
matchRegex: '^/sdk-js',
},
};
module.exports = {
siteName: 'Availity Docs',
baseUrl: 'https://availity.github.io',
navConfig,
};

Theme Configs

Option nameTypeDescription
rootstringMust be __dirname
subtitlestringThe title that gets rendered above the sidebar navigation
descriptionstringThe site description for SEO and social (FB, Twitter) tags
contentDirstringThe directory where docs content exists (docs/source by default)
gitTypestringThe repository manager: Github, Bitbucket, or Gitlab
gitRepostringThe owner and name of the content repository on Github, Bitbucket, or Gitlab
sidebarCategoriesobjectAn object mapping categories to page paths ([described below][])
navConfigobjectAn object containing all the navigation items rendered at the top right of the top nav

sidebarCategories

The sidebarCategories option is an object keyed by category titles. Each entry in the object is an array of page paths. The path should resemble the location of a Markdown/MDX file in the git repository, relative to contentDir, and without the .md extension. Sidebar navigation items that are not a member of a category live under the null key.

{
null: [
'index',
'getting-started',
'whats-new'
],
Features: [
'features/mocking',
'features/errors',
'features/data-sources'
]
}

If you want to have secondary categories like Gatsby Them Core then you can make your category an object like the below.

{
'API Reference': [{
resolve: 'reference/gatsby-core/index', // The secondary page introd
pages: [ // the list of pages underneath
'reference/gatsby-core/components','reference/gatsby-core/reference'
]
}, 'reference/gatsby-docs'],
}

The navConfig option is an object keyed by the title of the nav items to be rendered at the top right of the screen in the navigation.

{
'/availity-workflow': {
text: 'Getting Started',
matchRegex: '^/availity-workflow',
},
'/availity-uikit': {
text: 'UI Kit',
matchRegex: '^/availity-uikit',
},
}