Using an image caption in Markdown Jekyll

后端 未结 10 871
一个人的身影
一个人的身影 2021-01-29 18:11

I am hosting a Jekyll Blog on Github and write my posts with Markdown. When I am adding images, I do it the following way:

![name of the image](http://link.com/ima

10条回答
  •  别那么骄傲
    2021-01-29 18:16

    If you don't want to use any plugins (which means you can push it to GitHub directly without generating the site first), you can create a new file named image.html in _includes:

    {{ include.description }}
    {{ include.description }}

    And then display the image from your markdown with:

    {% include image.html url="/images/my-cat.jpg" description="My cat, Robert Downey Jr." %}
    

提交回复
热议问题