File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,18 @@ following lines to `mkdocs.yml`:
19
19
markdown_extensions :
20
20
- attr_list
21
21
- md_in_html
22
+ - pymdownx.blocks.caption
22
23
` ` `
23
24
24
25
See additional configuration options:
25
26
26
27
- [Attribute Lists]
27
28
- [Markdown in HTML]
29
+ - [Caption]
28
30
29
31
[Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists
30
32
[Markdown in HTML]: ../setup/extensions/python-markdown.md#markdown-in-html
33
+ [Caption]: ../setup/extensions/python-markdown-extensions.md#caption
31
34
32
35
### Lightbox
33
36
@@ -135,6 +138,16 @@ but it's always possible to use the [Markdown in HTML] extension with literal
135
138
</figure >
136
139
</div >
137
140
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
+ { width="300" }
146
+ /// caption
147
+ Image caption
148
+ ///
149
+ ```
150
+
138
151
### Image lazy-loading
139
152
140
153
Modern 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.
110
110
111
111
[BetterEm]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
112
112
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
+
113
132
### Caret, Mark & Tilde
114
133
115
134
<!-- md:version 1.0.0 -->
You can’t perform that action at this time.
0 commit comments