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.
To display a header the # is used.
# Level 1
## Level 2
### Level 3
#### Level 4
##### Level 5
###### Level 6
Ths produces the following:
To add a paragragh, press the Enter key twice.
The is paragragh one.
And this is paragragh two.
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
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
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
To strikethrough text use two ~
For example
~~This text is strijkethrough~~
produces
This text is strijkethrough
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
For an unordered list use either a -, *, or + a the beginning of the item text
For example
- Item 1
- Item 2
- Item 3
produces
And for the *
* Item 1
* Item 2
* Item 3
produces
And for the +
+ Item 1
+ Item 2
+ Item 3
produces
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
Lisnks are created using the syntax [Link text](link url)
For example
[Coding with an Accent](http://www.codingwithanaccent.com)
produces
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 |
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");
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