0

I'd like to document other functions and parts of my code base with markdown and have them parsed and displayed in a different section of my documentation. How can I do this?

/**
 * Merge route into the global application state
 */ 
export const reducer = (state = initialState, action) => {

Importing them directly into styleguide.config.js results in the entire file being parsed as text.

Brett DeWoody
  • 59,771
  • 29
  • 135
  • 184
acharlop
  • 309
  • 4
  • 12

1 Answers1

0

Generate Markdown documentation using tools like documentation.js, and then include those files as sections into Styleguidist:

module.exports = {
  sections: [
    {
      name: 'Some other API',
      content: 'docs/generated-file.md'
    },
    {
      name: 'Components',
      components: 'lib/components/**/*.js'
    }
  ]
}
Artem Sapegin
  • 3,096
  • 2
  • 16
  • 20