问题
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