hacks-guide-minimal-mistake.../docs/_posts/2010-08-06-post-image-linked-caption.md

22 lines
576 B
Markdown
Raw Normal View History

2016-09-22 04:13:25 +02:00
---
title: "Post: Image (Linked with Caption)"
categories:
- Post Formats
tags:
- image
- Post Formats
---
{% capture fig_img %}
2018-12-11 14:10:27 +01:00
[![Foo](https://images.unsplash.com/photo-1541943869728-4bd4f450c8f5?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=800&fit=max&ixid=eyJhcHBfaWQiOjF9)](https://unsplash.com/)
2016-09-22 04:13:25 +02:00
{% endcapture %}
{% capture fig_caption %}
2018-12-11 14:10:27 +01:00
Image with a caption.
2016-09-22 04:13:25 +02:00
{% endcapture %}
<figure>
{{ fig_img | markdownify | remove: "<p>" | remove: "</p>" }}
<figcaption>{{ fig_caption | markdownify | remove: "<p>" | remove: "</p>" }}</figcaption>
2018-12-11 14:10:27 +01:00
</figure>