markdown 文件的 YAML header 在文档顶部生成奇数 table
YAML header of markdown file generates odd table on top of document
我从我的 YAML header 得到了一个我不想要的奇怪输出。
相反,我当然期望带有标题、作者和 table 内容的正常输出。
以下代码产生以下输出:
---
title: General Stuff
author: Me
output:
html_document:
toc: true # table of content true
toc_depth: 3 # upto three depths of headings (specified by #, ## and ###)
number_sections: true ## if you want number sections at each table header
theme: united
---
生成此输出:
我从显示文件的 GitHub 得到了这个输出。也许问题是 GitHub 使用了一些有趣的降价版本...?
Maybe the issue is that GitHub uses some interesting markdown version...?
YAML frontmatter 不是 Markdown itself 的一部分。普通的 Markdown 处理器不会用它做任何特别的事情。它可能会呈现 <hr>
和一些文本,可能以 header.
结尾
但是是的,GitHub treats YAML front matter specially:
Many blogging websites, like Jekyll with GitHub Pages, depend on
some YAML-formatted metadata at the beginning of your post. You know, the stuff that goes between dashes like this:
---
title: Blogging Like a Boss
---
Starting [September 27, 2013], we’ll render this metadata within GitHub as an
horizontal table, for easier reading
我从我的 YAML header 得到了一个我不想要的奇怪输出。 相反,我当然期望带有标题、作者和 table 内容的正常输出。
以下代码产生以下输出:
---
title: General Stuff
author: Me
output:
html_document:
toc: true # table of content true
toc_depth: 3 # upto three depths of headings (specified by #, ## and ###)
number_sections: true ## if you want number sections at each table header
theme: united
---
生成此输出:
我从显示文件的 GitHub 得到了这个输出。也许问题是 GitHub 使用了一些有趣的降价版本...?
Maybe the issue is that GitHub uses some interesting markdown version...?
YAML frontmatter 不是 Markdown itself 的一部分。普通的 Markdown 处理器不会用它做任何特别的事情。它可能会呈现 <hr>
和一些文本,可能以 header.
但是是的,GitHub treats YAML front matter specially:
Many blogging websites, like Jekyll with GitHub Pages, depend on some YAML-formatted metadata at the beginning of your post. You know, the stuff that goes between dashes like this:
--- title: Blogging Like a Boss ---
Starting [September 27, 2013], we’ll render this metadata within GitHub as an horizontal table, for easier reading