<!– include recent-posts.html –> {%- if jekyll.environment != 'production' and site.data.setup.fast-content-build -%}{%- else -%} {%- comment -%}<!–

Usage:

Configure the number of referenced posts by assigning a value to `number-of-recent-posts-in-widget` in the file “_data/setup.yml”.

Configure the text for the header message in “_data/text-for.yml” for the item `tRecent`.

–>{%- endcomment %} <div>

{%- assign recent = 'Recent' -%}
{%- if site.data.text-for.tRecent -%}
        {%- assign recent = site.data.text-for.tRecent -%}
{%- endif %}
<h1>{{ recent }}:</h1>
{%- for post in site.posts limit: site.data.setup.number-of-recent-posts-in-widget %}
        <p><a href="{{ post.url | relative_url }}">{% if post.date %}{{ post.date | date: "%F" }}{% endif %} {{ post.title }}</a></p>
{%- endfor %}

</div> {%- endif %} <!– end of include recent-posts.html –>