My markdown cheatsheet
Insert images
<!-- simple -->
<img src="/assets/images/test.jpg" width="1000" height="300" />
<!-- Aspect ratio -->
<img src="/assets/images/test.jpg" width="50%"/>
<!-- with caption -->
<figure align="center">
<img src="/assets/images/4920-ethics-kant-mill.png" alt="image" />
<figcaption align="center">This is my caption text.</figcaption>
</figure>
<!-- The ALT text adds a text description to an image on a Web page -->
<!-- this one can centre in jekyll, note that using this syntax, only width will take effect and the ratio is remained -->
<p align="center">
<img src="/assets/images/unsw-courses/2511-1.png" alt="drawing" width="500"/>
</p>
![image](/assets/images/test.jpg)
Table
<!-- with bullet points -->
| Course | Comments |
|:-------| :--------------------------- |
|... |<ul><li> ...</li><li>...</li><ul>|
Fruit | Price | Advantages |
---|---|---|
Bananas | $1.34 |
|
Oranges | $2.10 |
|
Emoji
If you are using mobile browser: Be very careful here!
Hidden list
<details>
<summary markdown="span">Click to expand/hide</summary>
123
</details>
Click to expand/hide
123Folder structure
├── 1
│ ├── 2
| | ├──3
| | | ├──4
Minor
Newline
<br />
Jekyll
Code snippet in Collispable section
<!-- note below use the raw tag, to escape the liquid tags see: https://stackoverflow.com/questions/3426182/how-to-escape-liquid-template-tags-->
<details>
<summary markdown="span" style="color:blue;">Code</summary>
{% highlight python %}
print("hello world")
{% endhighlight %}
</details>
Here is the output of above code
print("hello world")
Leave a comment