Create and posting a list of most recently edited notes on front page #146
-
Hello! I am really enjoying this jekyll template and have been using it here: https://gersande.com/tea/. I was wondering if it would be possible, on the front page or on the footer, to somehow create a short list of 5 or so of the most recently edited/generated notes. I'm not sure how to go around doing this myself, but I thought I would ask here, just in case someone would have an idea of how to do this, or how to go about getting jekyll to do this. Thank you so much! This is a really great template. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello! Thank you for the kind words, I'm glad you find the template useful. This should do it: <strong>Recently updated notes</strong>
<ul>
{% assign recent_notes = site.notes | sort: "last_modified_at_timestamp" | reverse %}
{% for note in recent_notes | limit: 5 %}
<li>
{{ note.last_modified_at | date: "%Y-%m-%d" }} — <a class="internal-link" href="{{ note.url }}">{{ note.title }}</a>
</li>
{% endfor %}
</ul> I added this as a default feature of the template in #147. Thank you for asking this question! |
Beta Was this translation helpful? Give feedback.
Hello! Thank you for the kind words, I'm glad you find the template useful.
This should do it:
I added this as a default feature of the template in #147. Thank you for asking this question!