From b62ddeda02fadcd09def9354eb2ef46a7562a106 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 6 Dec 2017 23:18:29 -0500 Subject: Switch docs to MKDocs (#602) Fixes #601. Merged in 6f87b32 from the md3 branch and did a lot of cleanup. Changes include: * Removed old docs build tool, templates, etc. * Added MkDocs config file, etc. * filename.txt => filename.md * pythonhost.org/Markdown => Python-Markdown.github.io * Markdown lint and other cleanup. * Automate pages deployment in makefile with `mkdocs gh-deploy` Assumes a git remote is set up named "pages". Do git remote add pages https://github.com/Python-Markdown/Python-Markdown.github.io.git ... before running `make deploy` the first time. --- docs/extensions/admonition.md | 84 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 docs/extensions/admonition.md (limited to 'docs/extensions/admonition.md') diff --git a/docs/extensions/admonition.md b/docs/extensions/admonition.md new file mode 100644 index 0000000..26e6299 --- /dev/null +++ b/docs/extensions/admonition.md @@ -0,0 +1,84 @@ +title: Admonition Extension + +Admonition +========== + +Summary +------- + +The Admonition 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: + +```md +!!! 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 class name and as default title. It must be a +single word. So, for instance: + +```md +!!! note + You should note that the title will be automatically capitalized. +``` + +will render: + +```html +
+

Note

+

You should note that the title will be automatically capitalized.

+
+``` + +Optionally, you can use custom titles. For instance: + +```md +!!! danger "Don't try this at home" + ... +``` + +will render: + +```html +
+

Don't try this at home

+

...

+
+``` + +If you don't want a title, use a blank string `""`: + +```md +!!! important "" + This is a admonition box without a title. +``` + +results in: + +```html +
+

This is a admonition box without a title.

+
+``` + +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/ -- cgit v1.2.3