histoire-dev / histoire-dev/histoire
Ability to load external md files into <docs>
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
### 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
```
import ExternalDocument from `mypackage/README.md`
{{ ExternalDocument }}
```
### Additional context
It does seem like this is somewhat supported, except it throws an error right now (doesn't seem to parse as markdown)
```
Error while collecting story /home/freek/projects/toolkit/demo/components/Generic/Button.story.vue:
Error: Parse failure: Unexpected character ' ' (1:1)
Contents of line 1: # Hallo
at Object.ssrTransform (/home/freek/projects/toolkit/demo/node_modules/vite/dist/node/chunks/dep-c9998dc6.js:48653:15)
at ViteNodeServer._transformRequest (file:///home/freek/projects/toolkit/demo/node_modules/vite-node/dist/server-d9fc65e0.js:180:36)
at async ViteNodeServer._fetchModule (file:///home/freek/projects/toolkit/demo/node_modules/vite-node/dist/server-d9fc65e0.js:166:17)
at async MessagePort. (file:///home/freek/projects/toolkit/demo/node_modules/birpc/dist/index.mjs:16:18)
```
### Validations
- [X] Follow our [Code of Conduct](https://github.com/histoire-dev/histoire/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/histoire-dev/histoire/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://histoire.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/histoire-dev/histoire/issues) that requests the same feature to avoid creating a duplicate.
Contributor guide
Assessment
This issue has not been assessed yet.