Open FreekVR opened 2 years ago
edit: I got part way through editing
markdown.ts
to look for asrc
attribute in theid
and resolve and read the file etc, when I found that I can already use src to add my documentation markdown - works for me. The only thing I would add if I was updating the implementation would be to put a watcher on the file (just work out the file path from about line 123 and add a chokidar.watch on it.
I have a similar use case where I need multiple stories for a component and I want the same documentation for all of them.
I think the suggested solution would be great, or the ability to add it as an attribute on either a story or variant.
There would probably be issues with the alternative suggestion as:
<docs lang="md" src="./test.md"></docs>
test.md
# Hello world
I think this issue might have been resolved in one of the updates, as this works for me. It also solves an issue I was having where the sibling markdown file pattern eg:
some.story.vue
some.story.md
was working in dev mode, but in the built version stories showed the "no documents" message related to #538.
Clear and concise description of the problem
As a component library author I want to be able to load my existing README files into histoire, so that I can browse the documentation both inside histoire and in the repository (eg gitlab/github etc) and do not have to duplicate the docs.
Suggested solution
Alternative
Additional context
It does seem like this is somewhat supported, except it throws an error right now (doesn't seem to parse as markdown)
Validations