Стандарт тот ещё – As I started writing my articles for my blog, I realized I needed something. To help me write articles using this flavor of Markdown1, I needed my own cheat sheet. My hope is that it provides clear guidance on which aspects of the various forms of Markdown worked for me, and which didn’t.

Introduction

I am writing articles and pages on Pelican 4.0.12 using the Elegant3 theme, therefore I want to make sure I have a cheat sheet that is specific to this dialect of Markdown. The base Markdown used for Pelican uses the Python Markdown Package which (with 3 exceptions) follows John Gruber’s Markdown definition very literally. Pelican configuration also supports providing Markdown with additional configuration that enables other features. Those features are documented separately in the next page.

The format of this cheat sheet is simple. Each section is separated from the next with a horizontal break and the name of the section. Any notes regarding that section are placed at the top of the section in point form, to ensure they are brief. Then a Code Block section is used to show the literal code used to produce the effects that are presented right after the code block.


Horizontal Break

A horizontal break occurs after 3 or more hyphens.

---

A horizontal break occurs after 3 or more hyphens.


Headings

# Heading Level 1

## Heading Level 2

### Heading Level 3

Heading Level 1

Heading Level 2

Heading Level 3


Text Emphasis

  • two spaces at the end of a line will be equivalent to <br/>
This text is \*\*bold\*\* and this text is also \_\_bold\_\_.  
This text is \*italic\* and this text is also \_italic\_.  
This text is \*\*\_italic and bold\_\*\*, but no two spaces at end.
Single \`\`\`line\`\`\` block.  
Inline \`code\` has \`\`\`back-ticks like this \` around\`\`\` it.  

This text is bold and this text is also bold.
This text is italic and this text is also italic.
This text is italic and bold, but no two spaces at end. Single line block.
Inline code has back-ticks like this ` around it.


Numbered lists

  • to maintain the indentation, place 4 spaces at the start of the line
1. One  

    New para.  

    Blah

2. Two
    - unordered
    - list
3. Three
    1. ordered
    2. list
        - unordered
        - list
    3. items
  1. One

    New para.

    Blah

  2. Two

    • unordered
    • list
    • Three
    • ordered
    • list
      • unordered
      • list
    • items

Bulleted List

  • to maintain the indentation, place 4 spaces at the start of the line
-   This is a list item with two paragraphs.

    This is the second paragraph in the list item. You're
only required to indent the first line. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit.

- Another item in the same list.
    - Bulleted item
    - Bulleted item
  • This is a list item with two paragraphs.

    This is the second paragraph in the list item. You’re only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

  • Another item in the same list.

    • Bulleted item
    • Bulleted item

Block quote

> This is the first paragraph of a blockquote with two paragraphs.
> Lorem ipsum dolor sit amet,
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
>
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
>
> This is the first level of quoting.
>
> > This is nested blockquote.
>
> Back to the first level.

This is the first paragraph of a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

This is the first level of quoting.

This is nested blockquote.

Back to the first level.


Code Block

 ```text
Make things only as complex as they need to be.
 ```
Make things only as complex as they need to be.  
 ```Python
# Blogroll
LINKS = (
            ('Pelican', 'Pelican', 'http://getpelican.com/'),
         )
 ```
# Blogroll
LINKS = (
            ('Pelican', 'Pelican', 'http://getpelican.com/'),
         )

Tables

  • colons can be used to align columns.
| Column1 | Column 2 | Column 3
|---|---|---|
| Value 1 | Value 2 | Value 3 |
| Value 4 | Value 5 | Value 6 |
| Value 7 | Value 8 | Value 9 |

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |
Column1 Column 2 Column 3
Value 1 Value 2 Value 3
Value 4 Value 5 Value 6
Value 7 Value 8 Value 9
Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

  • {filename} tag indicates location in the content folder.
[About Page\]({filename}/pages/landing-page-about-hidden.md)

About Page

  • proper URL indicates a remote website
[Python Package Index\](https://pypi.org)

Python Package Index

  • download links are not natively supported in Markdown
  • must explicitly create HTML text inline to achieve that Creating a link to a file to download, not display, is not natively supported in markdown.
[Pelican Brag Document (display)\]({static}/images/markdown-1/pelican.txt)  
<a href="{static}/images/pelican.txt" download>Pelican Brag Document (download)</a>

Pelican Brag Document (display)
Pelican Brag Document (download)


Images

  • {filename} tag indicates location in the content folder.
![python logo](https://jackdewinter.github.io/images/markdown-1/python_icon.png)

python logo



  1. Markdown allows for HTML pages to be written using a simple text editor with no knowledge of HTML

  2. Pelican is a Static Site Generator written in Python. 

  3. The Elegant theme’s repository is here 

Понравилась статья? Расскажите о ней на: TwitterFacebookEmail


Dvesti раз ищет, значит найдёт

Что почитать


Дата

Обновлено

Категория

Website

Тэги

Будьте с нами