docs: add _layouts/post.html to Jekyll guide (#2628)

This commit is contained in:
Calvin 2019-09-06 06:09:12 +08:00 committed by Shawn Erquhart
parent 8bdfea4728
commit 5b143089e2

View File

@ -113,7 +113,7 @@ display_name: Jill Smith
position: Chief Editor
```
then update `_layouts/author.html` and `staff.html` accordingly.
then update `_layouts/author.html`, `_layouts/post.html` and `staff.html` accordingly.
```html
<!-- _layouts/author.html -->
@ -135,6 +135,23 @@ then update `_layouts/author.html` and `staff.html` accordingly.
</ul>
```
```html
<!-- _layouts/post.html -->
--- layout: default ---
<h1>{{ page.title }}</h1>
<p>
{{ page.date | date_to_string }}
{% assign author = site.authors | where: 'name', page.author | first %}
{% if author %}
- <a href="{{ author.url }}">{{ author.display_name }}</a>
{% endif %}
</p>
{{ content }}
```
```html
<!-- staff.html -->
--- layout: default ---