Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs files #237

Closed
2 tasks done
Akryum opened this issue Aug 12, 2022 · 3 comments
Closed
2 tasks done

Docs files #237

Akryum opened this issue Aug 12, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request in progress

Comments

@Akryum
Copy link
Member

Akryum commented Aug 12, 2022

To support more use cases (such as documenting .story.svelte files - #86), Histoire will support adding documentation as .story.md files that will automatically loaded into the corresponding story.

Example:

  • BaseButton.story.svelte
  • BaseButton.story.md

There will also be a new docsFile prop added to Story to specify a custom path to the md file.

  • Add docs to story with related md file
  • Standalone page
@Akryum Akryum added the enhancement New feature or request label Aug 12, 2022
@Akryum Akryum self-assigned this Aug 12, 2022
@Akryum
Copy link
Member Author

Akryum commented Aug 12, 2022

Putting a corresponding .md file next to a story populates the Docs tab:

image
image

@Akryum
Copy link
Member Author

Akryum commented Aug 12, 2022

Putting a standalone .story.md file creates a virtual story with docsOnly: true:

image
image

@rijkvanzanten
Copy link

Sorry to ping on an old issue, but whatever happened to:

There will also be a new docsFile prop added to Story to specify a custom path to the md file.

? I can't seem to find any docs or trace about this prop in the referenced commit or docs, which makes me worried it wasn't actually implemented? Is that something you'd accept a PR for @Akryum?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress
Projects
None yet
Development

No branches or pull requests

2 participants