Markdown cheatsheet
Welcome!
This is the new CS Wiki!
The new wiki uses Markdown format, so here's a quick cheatsheet on the basics:
Syntax guide
Here’s an overview of Markdown syntax that you can use on BookStack.
Headers
# This is an <h1> tag
## This is an <h2> tag
###### This is an <h6> tag
Newlines
This is all one
one single line
This will give us a
paragraph break.
If this is too much space, you can simply add two spaces to the end of the first line:
This will do what what we want
even though the syntax kind of sucks.
Will become:
This will do what what we want
even though the syntax kind of sucks.
Emphasis
*This text will be italic*
_This will also be italic_
**This text will be bold**
__This will also be bold__
_You **can** combine them_
~~This text will be struckthrough~~
Lists
For nested lists, be sure to line up the beginning *
, -
, or number of the sub-list with the first character of the items in the parent list.
Unordered
* Item 1
* Item 2
* Item 2a
* Item 2b
Ordered
What numbers you use don't actually matter.
1. Item 1
2. Item 2
3. Item 3
1. Item 3a
2. Item 3b
Images
![GitHub Logo](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png)
Format: ![Alt Text](url)
Links
Surrounding with <> to make clickable
<http://github.com> - automatic!
<help@cs.utexas.edu> - adds `mailto:` to beginning of link
http://github.com - automatic!
help@cs.utexas.edu - adds mailto:
to beginning of link
Replacing link with text
[GitHub](http://github.com)
Blockquotes
As Kanye West said:
> We're living the future so
> the present is our past.
Would become:
We're living the future so the present is our past.
Inline code
I think you should use an
`<addr>` element here instead.
Syntax highlighting
Here’s an example of how you can use syntax highlighting. It's the same as inline code, except you add the language's name right after the first ```:
```javascript
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}
```
You can also simply indent your code by four spaces:
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}
Task Lists
- [x] [links](), **formatting**, and <del>tags</del> supported
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item
Would become:
Tables
You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe |:
First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column
Would become:
First Header | Second Header |
---|---|
Content from cell 1 | Content from cell 2 |
Content in the first column | Content in the second column |
Additional syntax
Cheatsheets
https://commonmark.org/help/
https://www.markdownguide.org/cheat-sheet/
In-depth syntax
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
https://www.markdownguide.org/basic-syntax/