-
-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This feature can allow you to top articles via post front meta property `top`, the value is a number, the smaller the number is, the higher priority the article has. Example: ``` title: My Article top: <number> ```
- Loading branch information
1 parent
f3d2a6f
commit 30437ac
Showing
8 changed files
with
130 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%} | ||
|
||
{% assign article = post.content %} | ||
{% assign lang = post.lang %} | ||
{%- include functions.html func='get_reading_time' -%} | ||
{% assign reading_time = return %} | ||
{%- include functions.html func='get_article_excerpt' -%} | ||
{% assign excerpt = return %} | ||
{%- assign post_url = post.url | relative_url -%} | ||
|
||
<li class="{{ post_item_class }}"> | ||
<h2 class="post-title"> | ||
<a class="post-link" href="{{ post_url }}"> | ||
{{ post.title | escape }} | ||
{%- include views/post-badges.html -%} | ||
</a> | ||
</h2> | ||
<div class="post-meta"> | ||
<span class="post-date"><i class="fa fa-calendar"></i> {{ post.date | date: date_format }}</span> | ||
<span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span> | ||
</div> | ||
<a class="post-excerpt" href="{{ post_url }}"> | ||
<p> | ||
{{ excerpt }} <span class="read_more">Read More</span> | ||
</p> | ||
</a> | ||
<div class="post-tags"> | ||
{%- for tag in post.tags -%} | ||
<a class="post-tag" href="{{ '/tags.html ' | relative_url }}#{{tag}}">#{{tag}}</a> | ||
{%- endfor -%} | ||
</div> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<span class="post-badges"> | ||
<span class="post-badge badge-top">TOP</span> | ||
<span class="post-badge badge-new">NEW</span> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters