Markdown

Monday, Feb 8, 2021
Tags: markdown

As part of the migration from Wordpress to a static generatered site it was necessary to understand what markdown scripting is. Then recently I have attended a GitHub workshop for Aministrators ad Developers where markdown was used. So it appears that markdown will be part of my future.

This post is a cheatsheet and will demonstrate some of the basic components of Markdown that I expect to use as I write posts for this site.

Headers

To display a header the # is used.

# Level 1
## Level 2
### Level 3
#### Level 4
##### Level 5
###### Level 6

Ths produces the following:

Level 1

Level 2

Level 3

Level 4

Level 5
Level 6

Paragraghs

To add a paragragh, press the Enter key twice.

The is paragragh one.

And this is paragragh two.

Text Decoration

Bold Text

To bold text use two * or two _ before and after the text to be in bold.

For example:

**This is bold**

produces

This is bold

And this

__Also is bold__

produces

Also is bold

Italic Text

For italic text use one * or one _ before and after the text to be in italic.

For example:

*This is italic*

produces

This is italic

And this

_Also is italic_

produces

Also is italic

Bold and italic text

One way to achieve bold and italic text use three * or three _ before and after the text to be in bold and italic.

For example:

***This is bold and italic***

produces

This is bold and italic

And this

___Also is bold and italic___

produces

Also is bold and italic

Strikethrough

To strikethrough text use two ~

For example

~~This text is strijkethrough~~

produces

This text is strijkethrough

Lists

Ordered Lists

For order lists use a number and a period a the beginning of the item text

For example

 1. Item 1  
 1. Item 2  
 1. Item 3  

produces

  1. Item 1
  2. Item 2
  3. Item 3

Unordered Lists

For an unordered list use either a -, *, or + a the beginning of the item text

For example

 - Item 1  
 - Item 2  
 - Item 3  

produces

  • Item 1
  • Item 2
  • Item 3

And for the *

 * Item 1  
 * Item 2  
 * Item 3  

produces

  • Item 1
  • Item 2
  • Item 3

And for the +

 + Item 1  
 + Item 2  
 + Item 3  

produces

  • Item 1
  • Item 2
  • Item 3

Nested Lists

Nested lists can be created as follows.

1. Item 1
	- Item 1.1
	- Item 1.2
1. Item 2
	- Item 2.1
1. Item 3
	- Item 3.1

produces

  1. Item 1
    • Item 1.1
    • Item 1.2
  2. Item 2
    • Item 2.1
  3. Item 3
    • Item 3.1

Lisnks are created using the syntax [Link text](link url)

For example

[Coding with an Accent](http://www.codingwithanaccent.com)

produces

Coding with an Accent

Tables

Tables are created using | and _

For example

| Header 1 | Header 2 | Header 3 |
|---------|-----------|----------|
| Cell 1 | Cell 2 | Cell 3 |

produces

Header 1 Header 2 Header 3
Cell 1 Cell 2 Cell 3

It is possible to justify the contents of a cell using :

| Header 1 | Header 2 | Header 3 |
|:--------|:---------:|---------:|
| left | center | right |

produces

Header 1 Header 2 Header 3
left center right

Code

To be able to display code use three ` at the begining and end of the code segment

For example

```

Console.Write(“Hello world”);

```

produces


Console.Write("Hello world");

HTML

Not all markdown generators accept pure html. In the case of the HUGO static site generator I have not been able to use it.

So this is the markdown I believe I will initially need and what it can accomplish. As I learn more I will write further posts.

(C)2014-Today  Coding With An Accent