mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Link 'This Month in Rust OSDev' posts in status updates section
This commit is contained in:
@@ -47,3 +47,12 @@ with io.open("templates/auto/stars.html", 'w', encoding='utf8') as stars:
|
||||
with io.open("templates/auto/forks.html", 'w', encoding='utf8') as forks:
|
||||
forks.truncate()
|
||||
forks.write(format_number(repo.forks_count))
|
||||
|
||||
with io.open("templates/auto/status-updates.html", 'w', encoding='utf8') as status_updates:
|
||||
status_updates.truncate()
|
||||
|
||||
pulls = g.search_issues("is:merged", repo="rust-osdev/homepage", type="pr", label="next-post")[:5]
|
||||
|
||||
for pr in sorted(pulls, key=lambda issue: issue.closed_at, reverse=True):
|
||||
link = '<a href="' + pr.html_url + '">' + pr.title + "</a> "
|
||||
status_updates.write(u" <li>" + link + "</li>\n")
|
||||
|
||||
0
blog/templates/auto/status-updates.html
Normal file
0
blog/templates/auto/status-updates.html
Normal file
@@ -59,9 +59,7 @@
|
||||
{% set status_updates = get_section(path = "status-update/_index.md") %}
|
||||
<p>{{ status_updates.description }}</p>
|
||||
<ul>
|
||||
{% for page in status_updates.pages | slice(end=3) %}
|
||||
<li><b><a href="/{{ page.path | safe }}">{{ page.title }}</a></b></li>
|
||||
{% endfor %}
|
||||
{% include "auto/status-updates.html" %}
|
||||
<li><a href="{{ get_url(path="@/status-update/_index.md") | safe }}"><em>view all »</em></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
{% endblock introduction %}
|
||||
|
||||
<div><ul>
|
||||
{% include "auto/status-updates.html" %}
|
||||
{% for page in section.pages %}
|
||||
<li><b><a href="/{{ page.path | safe }}">{{ page.title }}</a></b></li>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user