tuchk4 / storybook-readme

React Storybook addon to render README files in github style
MIT License
544 stars 249 forks source link

Relative paths in readme files. #78

Open dylanaubrey opened 6 years ago

dylanaubrey commented 6 years ago

We are using storybook-readme to display each component's github readme within storybook... some of the readmes have links with relative paths to other github pages and these links are broken when the readme is rendered in storybook.

I wanted to find out if there is a recommended way of dealing with this?... and if not, whether there are any plans to support this? Cheers.

tuchk4 commented 6 years ago

I think is is possible to replace relative links with absolute link (baseUrl + relative link).

The problem is -- how to set baseUrl?

I would be happy for any help with this issue.

This feature could be implement at services/marked.js. (service that transforms raw markdown to html with marked.js).

Here is baseUrl option at its docs - prefix url for any relative link. The only issue - find way how setup baseUrl at storybook and pass it to marked.

B3Kay commented 5 years ago

I'm having problem with this as well. I wan't to add an image with relative URL to my README.md file but it does not work.

![Button example](../../../static/button_example.jpg)

Is there any plans for solving this?

daniele-zurico commented 5 years ago

same problem here how I can display an image in the readme?

Galiant commented 4 years ago

Same problem here. Is this plugin issue or is it the Storybook issue?