Jekyll 是否处理没有前端的文件?
Does Jekyll process files with no front matter?
https://jekyllrb.com/docs/variables/
'Any files with front matter are subject to processing.'
https://jekyllrb.com/docs/posts/
'All blog post files must begin with front matter which is typically used to set a layout or other meta data. '
我似乎有一个没有 yaml 格式前端的文件 - 一个带有一些 jekyll 标签的文件 - https://joekingthethird3.github.io/2019/08/09/test 但它仍然是 'processed' - 变量被替换等。我正在使用 github。你可能会嘲笑我的错误。
因为 GitHub Pages 会自动加载 jekyll-optional-front-matter
包作为依赖项,所以没有前言的 Markdown 文件可以在 GitHub Pages 托管站点上运行。
https://github.com/benbalter/jekyll-optional-front-matter 解释原因:
Out of the box, Jekyll requires that any markdown file have YAML front matter (key/value pairs separated by two sets of three dashes) in order to be processed and converted to HTML.
While that behavior may be helpful for large, complex sites, sometimes it's easier to simply add a plain markdown file and have it render without fanfare.
This plugin does just that. Any Markdown file in your site's source will be treated as a Page and rendered as HTML, even if it doesn't have YAML front matter.
Jekyll 中的帖子是特殊实体。它们的行为大多与其余的 Jekyll 对象不一致。
为此,Jekyll 的帖子将获得 "processed",即使它们没有前言 。
它们只需要是在名为 _posts
或 _drafts
.
的目录中某处以模式 YYYY-MM-DD-TITLE.extension
命名的文件
(此行为独立于 jekyll-optional-front-matter
插件,也可以仅使用 vanilla Jekyll 重现。)
https://jekyllrb.com/docs/variables/ 'Any files with front matter are subject to processing.'
https://jekyllrb.com/docs/posts/ 'All blog post files must begin with front matter which is typically used to set a layout or other meta data. '
我似乎有一个没有 yaml 格式前端的文件 - 一个带有一些 jekyll 标签的文件 - https://joekingthethird3.github.io/2019/08/09/test 但它仍然是 'processed' - 变量被替换等。我正在使用 github。你可能会嘲笑我的错误。
因为 GitHub Pages 会自动加载 jekyll-optional-front-matter
包作为依赖项,所以没有前言的 Markdown 文件可以在 GitHub Pages 托管站点上运行。
https://github.com/benbalter/jekyll-optional-front-matter 解释原因:
Out of the box, Jekyll requires that any markdown file have YAML front matter (key/value pairs separated by two sets of three dashes) in order to be processed and converted to HTML.
While that behavior may be helpful for large, complex sites, sometimes it's easier to simply add a plain markdown file and have it render without fanfare.
This plugin does just that. Any Markdown file in your site's source will be treated as a Page and rendered as HTML, even if it doesn't have YAML front matter.
Jekyll 中的帖子是特殊实体。它们的行为大多与其余的 Jekyll 对象不一致。
为此,Jekyll 的帖子将获得 "processed",即使它们没有前言 。
它们只需要是在名为 _posts
或 _drafts
.
YYYY-MM-DD-TITLE.extension
命名的文件
(此行为独立于 jekyll-optional-front-matter
插件,也可以仅使用 vanilla Jekyll 重现。)