Skip to content

Instantly share code, notes, and snippets.

@xcaspar
Last active September 1, 2019 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xcaspar/d2b263626030a6b93c9f to your computer and use it in GitHub Desktop.
Save xcaspar/d2b263626030a6b93c9f to your computer and use it in GitHub Desktop.

Gist 插入图片

@(开发工具)[gist]

####上传图片 将所需要的图片上传到gist 文章所需的目录下。

  • 下载工程 git clone https://gist.github.com/idxxxxxxx.git
  • 将所需要的图片复制到此工程目录。(注:由于同一篇gist下,文件的顺序是按文件名进行排列的,ASCII靠前的排前面,所以建议将图片的名称改成z开头,保证文章在最前面)
  • 添加&提交&推送 git add xxx git commit -m "xxxx" git push origin master 此时可以去gist web下查看图片是否OK。

引用所上传的图片

例如图片的文件名是z111111.png,gist id是9ada58a482c73f81195b,那么图片的url为:http://bl.ocks.org/xcaspar/raw/9ada58a482c73f81195b/w1437357177514.png 此时利用markdown语法插入图片即可。

注:

  • 图片后缀名必须小写
  • 具体可以参考此事例
@nielinjie
Copy link

示例失效了,图片没有嵌入。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment