Open Bug 1834865 Opened 2 years ago Updated 2 years ago

Add support for YAML frontmatter in markdown based stories

Categories

(Toolkit :: UI Widgets, enhancement)

enhancement

Tracking

()

People

(Reporter: hjones, Unassigned)

References

(Blocks 1 open bug)

Details

There are cases where it might be helpful to be able to specify metadata about our documentation only stories, specifically title and/or story path. We currently jump through some hoops in order to figure out the story title and where we should file it in Storybook. This logic will become increasingly unwieldy as we continue to add component documentation/markdown based stories to new places in the codebase. Instead it would be easier if we could parse something like this:

---
title: Domain Specific Widgets/Foo Bar/Baz
---

This is my documentation!

YAML frontmatter is a pretty common approach for adding metata to a markdown file, so there should be lots of options for libraries we can use to help us do the parsing.

You need to log in before you can comment on or make changes to this bug.