-
As the subject says, I'm looking to show X (say 3) recent full posts on the homepage, instead of a list of recent posts with links and a brief summary. Any ideas? (In case it isn't super obvious, I'm very new to Jekyll). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
hey @moffat you'd want something like: {% for post in site.posts limit:3 %}
{{ post.title }}
{% endfor %} Which would look through 3 posts - i think the 3 most recent posts should be displayed there. if you wanted 5 use then you can add any styling that you wish around that loop to style how each is printed and linked to. Cheers! SO i have something like that in my sites that looks like this that lists them horizontally using min mistakes styles.: <div class="feature__wrapper">
{% for post in site.posts limit:3 %}
<div class="feature__item">
<div class="archive__item">
<div class="archive__item-body">
<h3 class="archive__item-title"><a href="{{ site.baseurl }}{{ post.url}}" rel="permalink">{{ post.title }}</a></h3>
<div class="archive__item-excerpt">
<p>{{ post.excerpt | markdownify }}</p>
</div>
</div>
</div>
</div>
{% endfor %}
</div> |
Beta Was this translation helpful? Give feedback.
hey @moffat you'd want something like:
Which would look through 3 posts - i think the 3 most recent posts should be displayed there. if you wanted 5 use
limit:5
then you can add any styling that you wish around that loop to style how each is printed and linked to. Cheers!
SO i have something like that in my sites that looks like this that lists them horizontally using min mistakes styles.: