From 30437acaf53524ed97175d513b23d8042f3cf375 Mon Sep 17 00:00:00 2001 From: Jeffrey Tse Date: Mon, 21 Aug 2023 20:33:58 +0800 Subject: feat: support to pin articles (#50) 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: ``` --- _includes/views/pagination-item.html | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 _includes/views/pagination-item.html (limited to '_includes/views/pagination-item.html') diff --git a/_includes/views/pagination-item.html b/_includes/views/pagination-item.html new file mode 100644 index 0000000..bea6d91 --- /dev/null +++ b/_includes/views/pagination-item.html @@ -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 -%} + +
  • +

    + + {{ post.title | escape }} + {%- include views/post-badges.html -%} + +

    + + +

    + {{ excerpt }} Read More +

    +
    + +
  • -- cgit v1.2.3