博客上贴 GitHub 的 Gist 代码
之前一直觉得 Gist 没啥用,但是现在发现还是挺方便的。
但是如何在 Markdown 中使用 gist 代码呢?
其实 Markdown 只是渲染特定内容的文本为 html。不渲染的自然就是 html 代码了。
所以我们就用 gist 贴一段代码试试:
显示效果如下:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fancycoding = {} | |
fancycoding.Author = "Robin Zhang" | |
table.insert(fancycoding, { | |
hello = "Markdown with gist" | |
}) |
快来试试吧!
博客上贴 GitHub 的 Gist 代码