aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extensions/admonition.txt
diff options
context:
space:
mode:
authorTiago Serafim <tserafim@gmail.com>2012-09-19 18:43:21 -0300
committerTiago Serafim <tserafim@gmail.com>2012-09-19 18:43:21 -0300
commit85e74fb710e64a35b3ed458bdec6cfed7827c3b1 (patch)
tree0f036613cca208a1cb0505348f308d3d13bd908a /docs/extensions/admonition.txt
parent9756cb9f6014347179a9acf54a739aad5dda0c6d (diff)
downloadmarkdown-85e74fb710e64a35b3ed458bdec6cfed7827c3b1.tar.gz
markdown-85e74fb710e64a35b3ed458bdec6cfed7827c3b1.tar.bz2
markdown-85e74fb710e64a35b3ed458bdec6cfed7827c3b1.zip
First version of the docs.
Diffstat (limited to 'docs/extensions/admonition.txt')
-rw-r--r--docs/extensions/admonition.txt75
1 files changed, 75 insertions, 0 deletions
diff --git a/docs/extensions/admonition.txt b/docs/extensions/admonition.txt
new file mode 100644
index 0000000..48b70c8
--- /dev/null
+++ b/docs/extensions/admonition.txt
@@ -0,0 +1,75 @@
+title: Admonition
+prev_title: Smart Strong Extension
+prev_url: smart_strong.html
+next_title: CodeHilite Extension
+next_url: code_hilite.html
+
+Admonition
+==========
+
+Summary
+-------
+
+This extension adds [rST-style][rST] admonitions to Markdown documents.
+
+This extension is included in the standard Markdown library.
+
+[rST]: http://docutils.sourceforge.net/docs/ref/rst/directives.html#specific-admonitions
+
+Syntax
+------
+
+Admonitions are created using the following syntax:
+
+ !!! [type] [optional explicit title within double quotes]
+ Any number of other indented markdown elements.
+
+ This is the second paragraph.
+
+`type` will be used as the CSS classname and as default title. It must be a
+single word. So, for instance:
+
+ !!! note
+ You should note that the title will be automatically capitalized.
+
+will render:
+
+ <div class="admonition note">
+ <p class="admonition-title">Note</p>
+ <p>You should note that the title will be automatically capitalized.</p>
+ </div>
+
+Optionally, you can use custom titles. For instance:
+
+ !!! danger "Don't try this at home"
+ ...
+
+will render:
+
+ <div class="admonition danger">
+ <p class="admonition-title">Don't try this at home</p>
+ <p>...</p>
+ </div>
+
+If you don't want a title, use a blank string `""`:
+
+ !!! important ""
+ This is a admonition box without a title.
+
+results in:
+
+ <div class="admonition important">
+ <p>This is a admonition box without a title.</p>
+ </div>
+
+
+rST suggests the following `types`, but you're free to use whatever you want:
+ attention, caution, danger, error, hint, important, note, tip, warning.
+
+Styling
+-------
+
+There is no CSS included as part of this extension. Look up the default
+[Sphinx][sphinx] theme if you need inspiration.
+
+[sphinx]: http://sphinx.pocoo.org/ \ No newline at end of file