docs: add _layouts/post.html to Jekyll guide (#2628)
This commit is contained in:
parent
8bdfea4728
commit
5b143089e2
@ -113,7 +113,7 @@ display_name: Jill Smith
|
|||||||
position: Chief Editor
|
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
|
```html
|
||||||
<!-- _layouts/author.html -->
|
<!-- _layouts/author.html -->
|
||||||
@ -135,6 +135,23 @@ then update `_layouts/author.html` and `staff.html` accordingly.
|
|||||||
</ul>
|
</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
|
```html
|
||||||
<!-- staff.html -->
|
<!-- staff.html -->
|
||||||
--- layout: default ---
|
--- layout: default ---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user