Incluir post_list.html personalizado
https://github.com/riggraz/no-style-please/issues/11
This commit is contained in:
parent
1552b439fb
commit
4862073c97
|
@ -0,0 +1,25 @@
|
||||||
|
{% if include.category %}
|
||||||
|
{% assign posts = site.categories[include.category] %}
|
||||||
|
{% else %}
|
||||||
|
{% assign posts = site.posts %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if include.limit and posts.size > include.limit %}
|
||||||
|
{% assign limit_exceeded = true %}
|
||||||
|
{% else %}
|
||||||
|
{% assign limit_exceeded = false %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if posts.size > 0 -%}
|
||||||
|
<ul>
|
||||||
|
{%- for post in posts limit: include.limit -%}
|
||||||
|
<li>
|
||||||
|
<span>{{- post.date | date: site.theme_config.date_format -}}</span>
|
||||||
|
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
||||||
|
</li>
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- if include.show_more and limit_exceeded -%}
|
||||||
|
<li><a href="{{ include.show_more_url }}">{{ include.show_more_text | default: "Show more..." }}</a></li>
|
||||||
|
{%- endif -%}
|
||||||
|
</ul>
|
||||||
|
{%- endif -%}
|
Loading…
Reference in New Issue