-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.html
46 lines (38 loc) · 1.34 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
layout: page
titles:
en: Home
zh: 主页
zh-Hans: 主頁
zh-Hant: 主頁
show_title: false
---
<div class="layout--home">
<div class="post-list">
{%- for post in paginator.posts -%}
<article itemscope itemtype="http://schema.org/BlogPosting">
{%- include snippets/prepend-baseurl.html path=post.url -%}
{%- assign _href = __return -%}
{%- include snippets/locale-to-string.html locale=site.data.locale.READMORE -%}
{%- assign _locale_readmore = __return -%}
<header class="article__header"><h2 itemprop="headline"><a href="{{ _href }}">{{ post.title }}</a></h2></header>
<div class="article__content" itemprop="description articleBody">
{%- assign _excerpt_type = site.excerpt_type | default: site.data.variables.default.excerpt_type -%}
{%- if _excerpt_type == 'html' -%}
{{ post.excerpt | strip_html | truncate: 150 }}
{%- else -%}
{{ post.excerpt | strip_html | truncate: 150 }}
{%- endif -%}
</div>
<p class="post-list__readmore"><a href="{{ _href }}">{{ _locale_readmore }}</a></p>
{%- include article-info.html -%}
</article>
<div class="xda__border"></div>
{%- endfor -%}
</div>
{%- include paginator.html -%}
</div>
<script>
{%- include scripts/home.js -%}
</script>
{{ content }}