GITPAGE使用了JEKYLL静态渲染页面,以下说明其中的目录结构与主要关键字
├── _config.yml
├── _layouts
│ ├── default.html
│ └── post.html
├── _posts
│ ├── 2007-10-29-why-every-programmer-should-play-nethack.md
│ └── 2009-04-26-barcamp-boston-4-roundup.md
└── index.html # can also be an 'index.md'
其中主要目录 _layouts
,_posts
_layouts
作为模板目录,模板名称就是文件名,如post.html
模板名称就是post
_posts
作为文章目标,一个特殊点是文件名必须按 yyyy-MM-dd-{name}.md
命名---
layout: post
title: "Welcome to Jekyll!"
tags: classic hollywood
---
layout
模板选择title
标题tags
标签,其中classic hollywood
将被处理为条目数组["classic", "hollywood"]
<ul>
/% for post in site.posts %/
<li>
<a href="// post.url //">// post.title //</a>
// post.excerpt //
<!-- 摘要 -->
</li>
/% endfor %/
</ul>
由于模板引擎关系,以上 /
代替 {
,}
通过在 tag
里指定分隔符来实现
---
excerpt_separator: <!--more-->
---
Excerpt with multiple paragraphs
Here's another paragraph in the excerpt.
<!--more-->
Out-of-excerpt