markdown 将图像添加到Gist.markdown中的markdown文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 将图像添加到Gist.markdown中的markdown文件相关的知识,希望对你有一定的参考价值。

How To - Upload and add Images to markdown files in Gist
------------------------------------------------------

Markdown files allow embedding images in it.
However it requires the image to be hosted at some location and we can add the url of the image to embed it.

Example:
``![Alternate image text](https://someurl/imagelocation/image.png)``

We can use services like imgur or other services to host the images and use the hosted URL.

What I'm going to show is just a quick and dirty alternative to the above mentioned image hosting services.

Once you have created a Gist, you can add comments to the Gist if required. 
We'll be using the features of this rich text editor of comment.

### Steps:
**1) Pre-requisite : Create a gist with atleast one file.**  
   ![Create Gist](https://cloud.githubusercontent.com/assets/711743/25689673/17296b42-30a8-11e7-9b62-90207b2a6686.png)

**2) Copy + Paste the image into the Comment field.**  
      OR  
     Drag and drop the image into the Comment field.    
     The image will start uploading to Github servers.
     ![Uploading Image](https://cloud.githubusercontent.com/assets/711743/25689748/83edbdf0-30a8-11e7-8526-b043089743d0.png)
 
**3) Once the image is uploaded, the Url link to the hosted image is visible in comments field**  
     ![Link for uploaded image](https://cloud.githubusercontent.com/assets/711743/25689713/564cdc46-30a8-11e7-883f-3ba3b9fb1454.png)

      ___Copy and Use this link in the .markdown file___  
      ``![image text](https://cloud.githubusercontent.com/assets/711743/25648417/57cd2c0c-2fe9-11e7-8753-b60ea2656faf.png)``

**4) Save the markdown file. And you'll see the image placed inline in the markdown file. Done!**  
     ![Image embedded in markdown](https://cloud.githubusercontent.com/assets/711743/25689775/b570dee8-30a8-11e7-936d-7ccc3d386e41.png)

以上是关于markdown 将图像添加到Gist.markdown中的markdown文件的主要内容,如果未能解决你的问题,请参考以下文章

markdown 将特色图像添加到RSS源。

markdown 将语言设置添加到“显示特色图像,直到选择变体”帮助文档

将图像添加到 Azure Devops 仪表板

R markdown:我可以将pdf作为图像插入到r markdown文件中吗?

markdown Magento 2 - 添加自定义类别图像

markdown Magento 2 - 添加自定义类别图像