GitHub Pages 和 Jekyll 笔记( 三 )


当文章中使用 front matter 定义了类别, 会在列表中添加这篇文章. 取决于 front matter 中是否定义了分类, 例如 category: classic hollywood, 或 categories: classic hollywood, 帖子就会相应地产生这样的链接 movies/horror/classic%20hollywood/2019/05/21/bride-of-chucky.html 或 movies/horror/classic/hollywood/2019/05/21/bride-of-chucky.html
文章摘要通过excerpt_separator定义, 例如
---excerpt_separator: <!--more-->---Excerpt with multiple paragraphsHere's another paragraph in the excerpt.<!--more-->Out-of-excerpt在列表中引用摘要
<ul>{% for post in site.posts %}<li><a href="https://www.huyubaike.com/biancheng/{{ post.url }}">{{ post.title }}</a>{{ post.excerpt }}</li>{% endfor %}</ul>草稿草稿可以放到 _drafts 目录下
.├── _drafts│└── a-draft-post.md...Jekyll 实例参考

  • https://github.com/github/government.github.com
  • https://github.com/artsy/artsy.github.io
【GitHub Pages 和 Jekyll 笔记】

经验总结扩展阅读