Jekyll is a static site generator that takes Markdown files and converts them to a website. Jekyll is a free and open-source application written in the Ruby programming language. Thousands of websites, including the Markdown Guide, rely on Jekyll to convert Markdown source files to HTML output. GitHub Pages uses Jekyll as the backend for its free website creation service.
By default, Jekyll uses the kramdown Markdown processor with stock settings, but you can enable other kramdown options or even switch Jekyll to another Markdown processor. See the Jekyll Markdown configuration options documentation for more information. You can change Jekyll’s kramdown settings in the _config.yml
file. The settings for the Markdown Guide are shown below.
kramdown:
syntax_highlighter: rouge
input: GFM
auto_ids: true
toc_levels: 1..3
Jekyll provides support for the following Markdown elements.
Element | Support | Notes |
---|---|---|
标题 | 支持 | |
段落 | 支持 | |
换行符 | 支持 | |
粗体 | 支持 | |
斜体 | 支持 | |
块引用 | 支持 | |
有序列表 | 支持 | |
无序列表 | 支持 | |
代码块 | 支持 | |
水平分隔符 | 支持 | |
链接 | 支持 | |
图片 | 支持 | |
表格 | 支持 | |
围栏代码块 | 支持 | |
语法高亮 | 支持 | Make sure that syntax_highlighter: rouge is in the kramdown section of the _config.yml file.
|
脚注 | 支持 | |
标题 ID | 支持 | |
定义列表 | 支持 | |
删除线 | 支持 | You can use two tildes (~~word~~ ) or one tilde (~word~ ) — both work.
|
任务列表 | 支持 | |
Emoji (复制和粘贴) | 支持 | |
Emoji (简码) | 不支持 | Not supported by default, but you can use the jemoji plugin to enable support. |
强调 | 不支持 | |
下标 | 不支持 | |
上标 | 不支持 | |
Automatic URL Linking | 支持 | |
Disabling Automatic URL Linking | 支持 | |
HTML | 支持 |
As an added bonus, Jekyll provides support for several obscure elements.
Element | Markdown | 渲染输出 |
---|---|---|
Abbreviation | *[HTML]: Hyper Text Markup Language The HTML specification is maintained by the W3C. |
The HTML specification is maintained by the W3C. |
现在不要停下来!在下面输入你的电子邮件地址,以通过电子邮件接收新的 Markdown 教程。我们不会发送垃圾邮件!