Skip to content

Commit 3db46f9

Browse files
committed
layouts: refine post layout
1 parent 42adffa commit 3db46f9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

_layouts/post.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,18 @@ <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}
1313
{%- if page.author -%}
1414
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span class="p-author h-card"
1515
itemprop="name">{{ page.author }}</span></span>
16-
{%- endif -%}</p>
17-
{%- if page.tags -%}
18-
<p>Tags: {{ page.tags | join: ', ' }}</p>
19-
{%- endif -%}</p>
16+
{%- endif -%}
17+
{%- if page.tags -%}
18+
<span>Tags: {{ page.tags | join: ', ' }}</span>
19+
{%- endif -%}
20+
</p>
2021

22+
{%- if page.image -%}
23+
<p>
24+
<img src="{{ page.image}}" alt="thumbnail" height="200px" />
25+
<hr />
26+
</p>
27+
{%- endif -%}
2128
</header>
2229

2330
<div class="post-content e-content" itemprop="articleBody">

_posts/2020-11-27-why-and-why.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ date: 2020-11-27 12:00:00 +0800
55
comments: true
66
categories: blog
77
image: https://user-images.githubusercontent.com/72891/100425593-7cc8e600-30ca-11eb-873c-1f9878911c20.jpg
8+
author: andelf
89
tags:
910
- diary
1011
---

0 commit comments

Comments
 (0)