File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,15 +19,18 @@ following lines to `mkdocs.yml`:
1919markdown_extensions :
2020 - attr_list
2121 - md_in_html
22+ - pymdownx.blocks.caption
2223` ` `
2324
2425See additional configuration options:
2526
2627- [Attribute Lists]
2728- [Markdown in HTML]
29+ - [Caption]
2830
2931 [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists
3032 [Markdown in HTML]: ../setup/extensions/python-markdown.md#markdown-in-html
33+ [Caption]: ../setup/extensions/python-markdown-extensions.md#caption
3134
3235### Lightbox
3336
@@ -135,6 +138,16 @@ but it's always possible to use the [Markdown in HTML] extension with literal
135138 </figure >
136139</div >
137140
141+ However, [ Caption] provides an alternative syntax to add captions
142+ to any Markdown block element, including images:
143+
144+ ``` markdown title="Image with caption"
145+ ![ Image title] ( https://dummyimage.com/600x400/ ) { width="300" }
146+ /// caption
147+ Image caption
148+ ///
149+ ```
150+
138151### Image lazy-loading
139152
140153Modern browsers provide [ native support for lazy-loading images] [ lazy-loading ]
Original file line number Diff line number Diff line change @@ -110,6 +110,25 @@ documentation][BetterEm] for more information.
110110
111111 [BetterEm]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
112112
113+ ### Caption
114+
115+ <!-- md:version 1.0.0 -->
116+ <!-- md:extension [pymdownx.blocks.caption][Caption] -->
117+
118+ The [Caption] extension adds the ability to add captions to any Markdown block,
119+ including images, tables, and code blocks. Enable it via `mkdocs.yml`:
120+
121+ ``` yaml
122+ markdown_extensions:
123+ - pymdownx.blocks.caption
124+ ```
125+
126+ The configuration options of this extension are not specific to Material for
127+ MkDocs, as they only impact the Markdown parsing stage. See the [Caption
128+ documentation][Caption] for more information.
129+
130+ [Caption]: https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/caption/
131+
113132### Caret, Mark & Tilde
114133
115134<!-- md:version 1.0.0 -->
You can’t perform that action at this time.
0 commit comments