A next-generation tool to create blazing-fast documentation sites
API
created:3/5/2021
updated:3/5/2021

Configuration types

DocType

Configurable document type. By default, all documents are treated as story page types.
'story' | 'blog' | 'page' | 'tags' | 'author' | string;
defaults
propertystoryblogpagetagsauthor
basePathdocs/blogs/pages/tags/authors/
storyPathstrue
labelDocsBlogPageTagsAuthors
indexHometrue
layout.fullPage
layout.navSidebartrue
layout.contextSidebartruetrue
topMenutruetrue
container
tabs{ page: '@component-controls/pages/ClassicPage' }

WebpackConfig

This is the webpack configuration object.
official documentation

StoryRenderFn

Story render function. The resolved control values are passed as the first argument and the story context is passed as the second argument.
function (controlValues*: [key: string]: any, context: any): any;

PageConfiguration

properties

NameTypeDescription
basePathstringbase url path for the page
containerComponentType | nullpage container react component
fullPagebooleanwhether to take a fullpage theme option
labelstringlabel - used for menu labels
indexHomebooleanwhether to have an index home page for the document type. if false will show the first document of the document type as the home page.
navSidebarbooleanwhether to add navigation sidebar to navigate all the pages of the same document type
contextSidebarbooleanwhether to add context sidebar to navigate the sections on the page
tabsPageTabstabs configuration for story-type pages
topMenubooleanwhether to add to the top navigation menu

PageTabs

Object of tab page configurations, the key is a string for the tab route.

TabConfiguration

story type pages can have multiple tabs with separate page configurations.

properties

NameTypeDescription
templatestringComponentType;
routestringtab route string
title*stringtitle will be used as tab caption
typestringpage container type - a key into the component-controls/pages package

ActionItem

an item in the ActionBar component

properties

NameTypeDescription
node*ReactNodetitle - if a string, will use the built-in components, else can provide custom React component
idstringoptional id, used if the title is not set
hrefstringif the title is a string and href is set will use a default <Link /> component
onClick(e) => voidif the title is a string and href is not set, onClick will be used on a <Button /> component
hiddenbooleanhide an action item
ordernumberoptional order, if not provided will use the natural order of items from right to left
groupstringnumber
aria-labelstringoptional label visible to screen readers for aria accessibility
panelReactNodepanel for Tab-enabled UI, where an action item can open up a panel with tabs, in this case, the onClick function can return true/false whether to open up the panel

ActionItems

an array of action items

ToolbarConfig

left and right-hand side toolbar configuration on the main screen

properties

NameTypeDescription
leftActionItemsleft side toolbar items
rightActionItemsright side toolbar items