Using an image caption in Markdown Jekyll

后端 未结 10 869
一个人的身影
一个人的身影 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:17

    The correct HTML to use for images with captions, is

    with
    .

    There's no Markdown equivalent for this, so if you're only adding the occasional caption, I'd encourage you to just add that html into your Markdown document:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit...
    
    
    my alt text
    This is my caption text.
    Vestibulum eu vulputate magna...

    The Markdown spec encourages you to embed HTML in cases like this, so it will display just fine. It's also a lot simpler than messing with plugins.

    If you're trying to use other Markdown-y features (like tables, asterisks, etc) to produce captions, then you're just hacking around how Markdown was intended to be used.

提交回复
热议问题