This is a continuation of the previous cheat sheet for my website. This article specifically addresses any extensions that are not part of the base Markdown specification.

Each section here represents an extension that I have enabled on my website. The formatting from the previous page is continued, with one small exception. The title of each section specifies the name of the extension instead of the name of the feature being documented (see Admonitions). If an extension contains more than one feature, such as the Extra extension, the title specifies the name of the extension, a dash, and the name of the feature (see Footnotes).

Introduction

The authors of the Python Markdown Package anticipated the addition of extra features. To ensure people would have choice, the base package can be extended using configuration.

The Markdown extensions have been activated on my website by inserting the following text into my peliconconf.py:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
MARKDOWN = {
    'extension_configs': {
        'markdown.extensions.extra': {},
        'markdown.extensions.admonition': {},
        'markdown.extensions.codehilite': {
            'css_class': 'highlight'
        },
        'markdown.extensions.meta': {},
        'smarty' : {
            'smart_angled_quotes' : 'true'
        },
        'markdown.extensions.toc': {
            'permalink': 'true'
        },
    }
}

Table Of Contents

[TOC]

CodeHilite - Code Blocks With Line Numbers

```
#!python
    # Code goes here ...
```
1
    # Code goes here ...

Extra - Footnotes

Here's a simple footnote,[^1] and here's a longer one.[^bignote]

[^1]: This is the first footnote.

[^bignote]: Here's one with multiple paragraphs and code.

Here’s a simple footnote,1 and here’s a longer one.2


Extra - Abbreviations

The HTML specification is maintained by the W3C.

*[HTML]: Hyper Text Markup Language
*[W3C]:  World Wide Web Consortium

The HTML specification is maintained by the W3C.


Extra - Definition Lists

Apple
:   Pomaceous fruit of plants of the genus Malus in
    the family Rosaceae.

Orange
:   The fruit of an evergreen tree of the genus Citrus.
Apple
Pomaceous fruit of plants of the genus Malus in the family Rosaceae.
Orange
The fruit of an evergreen tree of the genus Citrus.

Smartypants

  • advantage is that code blocks are unaffected
- apostrophe ' by itself
- apostrophe as in 'quote me'
- quotations mark " by itself
- quotations mark as in "quote me"
- replacement of multi-character sequences with Unicode: << ... -- >> ---
  • apostrophe ‘ by itself
  • apostrophe as in ‘quote me’
  • quotations mark ” by itself
  • quotations mark as in “quote me”
  • replacement of multi-character sequences with Unicode: « … – » —

Admonitions

  • broken down into section by the way that the Elegant theme colors the admonitions

!!! note
    You should note that the title will be automatically capitalized.

Note

You should note that the title will be automatically capitalized.

!!! important "Replacement Title"
    You should note that the default title will be replaced.

Replacement Title

You should note that the default title will be replaced.


!!! hint
    You should note that the title will be automatically capitalized.

Hint

You should note that the title will be automatically capitalized.

!!! tip "Replacement Title"
    You should note that the default title will be replaced.

Replacement Title

You should note that the default title will be replaced.


!!! warning
    You should note that the title will be automatically capitalized.

Warning

You should note that the title will be automatically capitalized.

!!! caution "Replacement Title"
    You should note that the default title will be replaced.

Replacement Title

You should note that the default title will be replaced.

!!! attention ""
    You should note that this will have no title due to the empty title.

You should note that this will have no title due to the empty title.


!!! danger
    You should note that the title will be automatically capitalized.

Danger

You should note that the title will be automatically capitalized.

!!! error "Replacement Title"
    You should note that the default title will be replaced.

Replacement Title

You should note that the default title will be replaced.


  1. This is the first footnote. 

  2. Here’s one with multiple paragraphs and code. 

Like this post? Share on: TwitterFacebookEmail

Comments

So what do you think? Did I miss something? Is any part unclear? Leave your comments below.


Published

Category

Website

Tags

Stay in Touch