What is the proper way to add an image to Morea markdown-formatted page?

假如想象 提交于 2019-12-12 04:07:07

问题


I am trying to add an image to the landing home page. For this, I have created a folder assets within master/src/morea and placed the image there.

Then, I have added a line into home.md:

![GrammarViz 2.0 screenshot](/morea/assets/screen-front.png "GrammarViz 2.0 screenshot")

The problem is that I see the image locally (http://localhost:4000/morea/assets/screen-front.png), but it had not appeared at github, because of the erroneous URL that has "morea" instead of my repository name:http://seninp.github.io/morea/assets/screen-front.png.

Thanks!


回答1:


It turns out that image URLs must be relative URLs in Morea. So, the fix is to simply remove the leading slash:

![GrammarViz 2.0 screenshot](morea/assets/screen-front.png "GrammarViz 2.0 screenshot")

Take a look at the ICS311s14 site for a working example.



来源:https://stackoverflow.com/questions/25410945/what-is-the-proper-way-to-add-an-image-to-morea-markdown-formatted-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!