-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
294 lines (206 loc) · 11.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="The Python-Markdown Project">
<link rel="canonical" href="https://Python-Markdown.github.io/extensions/admonition/">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Attribute Lists" href="../attr_list/" />
<link rel="prev" title="Abbreviations" href="../abbreviations/" />
<title>Admonition — Python-Markdown 3.8 documentation</title>
<link rel="stylesheet" href="../../static/nature.css" type="text/css" />
<link rel="stylesheet" href="../../static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../assets/_mkdocstrings.css" type="text/css" />
<link rel="stylesheet" href="../../custom.css" type="text/css" />
<link rel="stylesheet" href="../../mkdocstrings.css" type="text/css" />
<script type="text/javascript" src="../../static/jquery.js"></script>
<script type="text/javascript" src="../../static/underscore.js"></script>
</head>
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="https://github.com/Python-Markdown/markdown" title="View this project on GitHub"><img src="../../static/github.png" width=16px style="vertical-align: middle; margin-top: -1px" /></a>
</li>
<li class="right" style="margin-right: 10px">
<a href="../../sitemap.html" title="Sitemap" accesskey="I">index</a>
</li>
<li class="right">
<a href="../attr_list/" title="Attribute Lists" accesskey="N">next</a> |
</li>
<li class="right">
<a href="../abbreviations/" title="Abbreviations" accesskey="P">previous</a> |
</li>
<li><img src="../../py.png"
alt="icon" style="vertical-align: middle; margin-top: -1px"/></li>
<li class="nav-item nav-item-0">
<a href="../..">Python-Markdown 3.8 documentation</a> »
</li>
<li class="nav-item">
Officially Supported Extensions
» </li>
<li class="nav-item">
<a href="./">Admonition</a>
» </li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main"><h1 id="admonition">Admonition<a class="headerlink" href="#admonition" title="Permanent link">¶</a></h1>
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link">¶</a></h2>
<p>The Admonition extension adds <a href="http://docutils.sourceforge.net/docs/ref/rst/directives.html#specific-admonitions">rST-style</a> admonitions to Markdown documents.</p>
<p>This extension is included in the standard Markdown library.</p>
<h2 id="syntax">Syntax<a class="headerlink" href="#syntax" title="Permanent link">¶</a></h2>
<p>Admonitions are created using the following syntax:</p>
<pre class="codehilite"><code class="language-md">!!! type "optional explicit title within double quotes"
Any number of other indented markdown elements.
This is the second paragraph.
</code></pre>
<p><code>type</code> will be used as the CSS class name and as default title. It must be a
single word. So, for instance:</p>
<pre class="codehilite"><code class="language-md">!!! note
You should note that the title will be automatically capitalized.
</code></pre>
<p>will render:</p>
<pre class="codehilite"><code class="language-html"><div class="admonition note">
<p class="admonition-title">Note</p>
<p>You should note that the title will be automatically capitalized.</p>
</div>
</code></pre>
<p>Optionally, you can use custom titles. For instance:</p>
<pre class="codehilite"><code class="language-md">!!! danger "Don't try this at home"
...
</code></pre>
<p>will render:</p>
<pre class="codehilite"><code class="language-html"><div class="admonition danger">
<p class="admonition-title">Don't try this at home</p>
<p>...</p>
</div>
</code></pre>
<p>If you don’t want a title, use a blank string <code>""</code>:</p>
<pre class="codehilite"><code class="language-md">!!! important ""
This is an admonition box without a title.
</code></pre>
<p>results in:</p>
<pre class="codehilite"><code class="language-html"><div class="admonition important">
<p>This is an admonition box without a title.</p>
</div>
</code></pre>
<p>You can also provide additional CSS class names separated by spaces. The first
class should be the “type.” For example:</p>
<pre class="codehilite"><code class="language-md">!!! danger highlight blink "Don't try this at home"
...
</code></pre>
<p>will render:</p>
<pre class="codehilite"><code class="language-html"><div class="admonition danger highlight blink">
<p class="admonition-title">Don't try this at home</p>
<p>...</p>
</div>
</code></pre>
<p>rST suggests the following “types”: <code>attention</code>, <code>caution</code>, <code>danger</code>, <code>error</code>,
<code>hint</code>, <code>important</code>, <code>note</code>, <code>tip</code>, and <code>warning</code>; however, you’re free to use
whatever you want.</p>
<h2 id="styling">Styling<a class="headerlink" href="#styling" title="Permanent link">¶</a></h2>
<p>There is no CSS included as part of this extension. Check out the default
<a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> theme for inspiration.</p>
<h2 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent link">¶</a></h2>
<p>See <a href="../">Extensions</a> for general extension usage. Use <code>admonition</code> as the
name of the extension.</p>
<p>This extension does not accept any special configuration options.</p>
<p>A trivial example:</p>
<pre class="codehilite"><code class="language-python">markdown.markdown(some_text, extensions=['admonition'])
</code></pre>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li>
<a class="reference internal" href="#admonition">Admonition</a>
<ul>
<li>
<a class="reference internal" href="#summary">Summary</a>
</li>
<li>
<a class="reference internal" href="#syntax">Syntax</a>
</li>
<li>
<a class="reference internal" href="#styling">Styling</a>
</li>
<li>
<a class="reference internal" href="#usage">Usage</a>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless">
<a href="../abbreviations/" title="previous page">Abbreviations</a>
</p>
<h4>Next topic</h4>
<p class="topless">
<a href="../attr_list/" title="next page">Attribute Lists</a>
</p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="https://github.com/Python-Markdown/markdown/issues">Report a Bug</a></li>
<li><a href="https://github.com/Python-Markdown/markdown/edit/master/docs/extensions/admonition.md">Edit on GitHub</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../../search.html" method="get">
<div><input type="text" name="q" placeholder="Search docs" /></div>
<div><input type="submit" value="Go" /></div>
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="https://github.com/Python-Markdown/markdown" title="View this project on GitHub"><img src="../../static/github.png" width=16px style="vertical-align: middle; margin-top: -1px" /></a>
</li>
<li class="right" style="margin-right: 10px">
<a href="../../sitemap.html" title="Sitemap" accesskey="I">index</a>
</li>
<li class="right">
<a href="../attr_list/" title="Attribute Lists" accesskey="N">next</a> |
</li>
<li class="right">
<a href="../abbreviations/" title="Abbreviations" accesskey="P">previous</a> |
</li>
<li><img src="../../py.png"
alt="icon" style="vertical-align: middle; margin-top: -1px"/></li>
<li class="nav-item nav-item-0">
<a href="../..">Python-Markdown 3.8 documentation</a> »
</li>
<li class="nav-item">
Officially Supported Extensions
» </li>
<li class="nav-item">
<a href="./">Admonition</a>
» </li>
</ul>
</div>
<div class="footer" role="contentinfo">Copyright © 2010-2023, The Python-Markdown Project.
Created using <a href="https://www.mkdocs.org/">MkDocs</a> 1.6.1.
</div>
<script>var base_url = '../..';</script>
<script src="../../search/main.js"></script>
<!--
MkDocs version : 1.6.1
Docs Build Date UTC : 2025-04-09 17:38:32.472489+00:00
-->
</body>
</html>