Also list articles in order of recently edited.

This commit is contained in:
Ethan Dalool 2020-03-23 13:00:55 -07:00
parent 66e6301c32
commit d2d6905cd4

View file

@ -343,9 +343,19 @@ def write_writing_index():
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<h2>Recently edited</h2>
<ul>
{% for article in articles_edited %}
<li>
<a href="{{article.web_path}}">{{article.date}} - {{article.title}}</a>
</li>
{% endfor %}
</ul>
</body> </body>
''').render( ''').render(
articles=sorted(ARTICLES.values(), key=lambda a: a.date, reverse=True), articles=sorted(ARTICLES.values(), key=lambda a: a.date, reverse=True),
articles_edited=sorted(ARTICLES.values(), key=lambda a: a.edited, reverse=True)
) )
write(writing_rootdir.with_child('index.html'), page) write(writing_rootdir.with_child('index.html'), page)