layout: default
<div class=“home”>
{%- if page.title -%} <h1 class="page-heading">{{ page.title }}</h1> {%- endif -%} {{ content }} {%- if paginator.posts.size > 0 -%} <h2 class="post-list-heading">{{ page.list_title | default: "主题" }}</h2> <ul class="post-list"> {%- for post in paginator.posts -%} <li> {%- assign date_format = site.spring-jekyll-theme.date_format | default: "%b %-d, %Y" -%} <span class="post-meta">{{ post.date | date: date_format }}</span> <h3> <a class="post-link" href="{{ post.url | relative_url }}"> {{ post.title | escape }} </a> </h3> {%- if site.show_excerpts -%} {{ post.excerpt }} {%- endif -%} </li> {%- endfor -%} </ul> <!-- 分页链接 --> {% if paginator.total_pages > 1 %} <div class="pagination"> {% if paginator.previous_page %} <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« 上一页</a> {% else %} <span>« 上一页</span> {% endif %} {% for page in (1..paginator.total_pages) %} {% if page == paginator.page %} <em>{{ page }}</em> {% elsif page == 1 %} <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a> {% else %} <a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a> {% endif %} {% endfor %} {% if paginator.next_page %} <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">下一页 »</a> {% else %} <span>下一页 »</span> {% endif %} </div> {% endif %} <p class="feed-subscribe"><svg class="svg-icon orange"><use xlink:href="{{ '/assets/social-icons.svg#rss' | relative_url }}"></use></svg><a href="{{ "/feed.xml" | relative_url }}">Subscribe</a></p> {%- endif -%}
</div>