Sha256: a273c4dee6544401410d028cf298516cf58d340ae88a2b7ea2a6323051ea286c

Contents?: true

Size: 703 Bytes

Versions: 1

Compression:

Stored size: 703 Bytes

Contents

{%- assign posts = site.posts | sort: "date" -%}

{%- if include.sticky -%}
  {%- assign sticky_posts = posts | where_exp: "item", "item.sticky == true" -%}
  {%- assign normal_posts = posts | where_exp: "item", "item.sticky != true" -%}
  {%- assign posts = sticky_posts | concat: normal_posts -%}
{%- elsif include.featured -%}
  {%- assign featured_posts = posts | where_exp: "item", "item.featured == true" -%}
  {%- assign normal_posts = posts | where_exp: "item", "item.featured != true" -%}
  {%- assign posts = featured_posts | concat: normal_posts -%}
{%- endif -%}

{%- if include.count -%}
  {%- assign posts = posts | slice: 0, include.count -%}
{%- endif -%}

{%- assign return = posts -%}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
databook-theme-0.1.2 _includes/functions/get_recent_posts.liquid