Difference between revisions of "Markdown"

From NovaOrdis Knowledge Base
Jump to: navigation, search
(Link to a Header)
Line 2: Line 2:
* Github "Mastering Markdown" https://guides.github.com/features/mastering-markdown/
* Github "Mastering Markdown" https://guides.github.com/features/mastering-markdown/
* https://daringfireball.net/projects/markdown/syntax

Revision as of 22:29, 13 February 2020




Markdown is a lightweight syntax for styling all forms of writing on the GitHub platform. It is automatically interpreted on GitHub when found in Gists, comments in Issues and Pull Requests and files with .md or .markdown extension.


# This is a <h1> header
## This is a <h2> header
##### This is a <h5> header

There must be at least one space between '#' and the header text!


*This text will be italic*
_This text will also be italic_


**This text will be bold**
__This text will also be bold__

Italic and bold can be combined.


<font color=magenta>something</font>

This does not seem to work with GitHub.

Paragraph Indentation

Sometimes &nbsp; works:



Link to an External URL

The http:// URL specified in text are automatically converted to links. Otherwise:


the URL can be absolute or relative.

Link to a Header

The header automatically introduces anchors we can link to.

If the header does not contain spaces, the link should include the lower-capitalized header text (only the first character), as follows:

[Link Text](#header)


# Blue

[Link Text](#blue)

If the header contains spaces, all component words' first characters, including the leading word, should be lower-capitalized and linked via dashes, as follows:

[Link Text](#lower-capitalized-header-whose-words-are-connected-by-dashes)


# This Is a Header

[Link Text](#this-is-a-header)


![Alt Text](url)

the URL can be absolute or relative.

Unnumbered List

Use stars or dashes as follows:

* Item 1
* Item 2
  * Item 2a
  * Item 2b
- Item 1
- Item 2
  - Item 2a
  - Item 2b

Numbered List

1. Item 1
2. Item 2
   * Item 2a
   * Item 2b


Use the '>' at the beginning of the line

> this is in
> blockquotes

Inline Code


blah blah blah `this will show up as code <blah>` then blah blah blah

Four leading spaces

This will show up normal and

    this will show up
      as code

normal again

Four Dashes

Works in GitHub, not sure if it works generically. When I find out, update this.

oc whoami

Code Fencing (GitHub Specific)

Specific to GitHub, allows multiple lines without indentation:

this will show up
  as code

For syntax highlighting, specify the language:

blah blah

GitHub Specific Markdown


~~will be stroke through~~

User Reference (Mention)


This is called an “@mention”, because you’re mentioning the individual. You can also @mention teams within an organization.

Task Lists

- [x] item checked
- [x] another item checked
- [ ] item that is not checked


First Header|Second Header
cell 1 | cell 2
cell 3  | cell 4

Repository References

SHA References

Any reference to a commit’s SHA-1 hash will be automatically converted into a link to that commit on GitHub.


Issue References

Any number that refers to an Issue or Pull Request will be automatically converted into a link.


Save Markdown as PDF


 grip --wide --title="Custom Title" ./myfile.md

Go with a browser to http://localhost:6419/ and print as PDF.

If using Chrome, it allows adjusting margins.