Skip to content

Instantly share code, notes, and snippets.

@yanping

yanping/index.html

Last active Dec 17, 2015
Embed
What would you like to do?
jekyll对read more的原生支持
---
layout: default
title: Welcome to
isHome: true
---
<!--from https://github.com/jsw0528/MrZhang.me/blob/gh-pages/_index.html-->
{% for post in paginator.posts %}
<article class="entry" id="{{ post.id }}">
<header>
<h1 class="entry-title">
<a href="{{ post.url }}">{{ post.title }}</a>
</h1>
<p class="entry-meta">
<time class="iconfont-time">{{ post.date | date: '%Y/%m/%d %A' }}</time>
</p>
</header>
{% assign fragments = post.content | split: '<!-- more -->' %}
{% assign size = fragments | size %}
{{ fragments | first }}
{% if size > 1 %}<p><a href="{{ post.url }}">继续阅读 &rarr;</a></p>{% endif %}
</article>
{% endfor %}
{% include pagination.html %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.