@hewes/storybook-addon-docs-graymatter
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

GitHub GitHub tag (latest by date) npm (scoped) node-current (scoped)

A Storybook front-matter documentation addon

drop-in for integrating, for example, docusaurus or github docs

Usage

Install

npm install @hewes/storybook-addon-docs-graymatter

Then edit .storybook/main.js

module.exports = {
  "stories": [
    "../docs/**/*.md",
    // ...
  ],
  "addons": [
    {
      name: "@hewes/storybook-addon-docs-graymatter"
    },
    // ...
  ],
}

Options

Option Description Default
prefix Prefix the title with this "Folder" i.e. a value of Documentation would create titles like Documentation/Title, which would therefore be in a sub folder.
fileNameFallback If this is true then files without front-matter will still be displayed using the relative filename as the title false

TODO

  • [x] filename fallback for files without front-matter
  • [ ] sidebar support (to support drop-in from docusaurus)
  • [ ] use https://github.com/atlassian/gray-matter-loader

Reference

Readme

Keywords

none

Package Sidebar

Install

npm i @hewes/storybook-addon-docs-graymatter

Weekly Downloads

0

Version

0.0.5

License

ISC

Unpacked Size

11.5 kB

Total Files

10

Last publish

Collaborators

  • aubreyhewes