Include an SVG (hosted on GitHub) in MarkDown

后端 未结 8 1793
执笔经年
执笔经年 2020-12-07 07:49

I know with that an image can be placed in a MD with the MD syntax of either ![Alt text](/path/to/img.jpg) or ![Alt text](/path/to/img.jpg "Optional

8条回答
  •  悲&欢浪女
    2020-12-07 08:21

    Use this site: https://rawgit.com , it works for me as I don't have permission issue with the svg file.
    Please pay attention that RawGit is not a service of github, as mentioned in Rawgit FAQ :

    RawGit is not associated with GitHub in any way. Please don't contact GitHub asking for help with RawGit

    Enter the url of svg you need, such as :

    https://github.com/sel-fish/redis-experiments/blob/master/dat/memDistrib-jemalloc-4.0.3.svg
    

    Then, you can get the url bellow which can be used to display:

    https://cdn.rawgit.com/sel-fish/redis-experiments/master/dat/memDistrib-jemalloc-4.0.3.svg
    

提交回复
热议问题