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:
|
with io.open("templates/auto/forks.html", 'w', encoding='utf8') as forks:
|
||||||
forks.truncate()
|
forks.truncate()
|
||||||
forks.write(format_number(repo.forks_count))
|
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") %}
|
{% set status_updates = get_section(path = "status-update/_index.md") %}
|
||||||
<p>{{ status_updates.description }}</p>
|
<p>{{ status_updates.description }}</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for page in status_updates.pages | slice(end=3) %}
|
{% include "auto/status-updates.html" %}
|
||||||
<li><b><a href="/{{ page.path | safe }}">{{ page.title }}</a></b></li>
|
|
||||||
{% endfor %}
|
|
||||||
<li><a href="{{ get_url(path="@/status-update/_index.md") | safe }}"><em>view all »</em></a></li>
|
<li><a href="{{ get_url(path="@/status-update/_index.md") | safe }}"><em>view all »</em></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
{% endblock introduction %}
|
{% endblock introduction %}
|
||||||
|
|
||||||
<div><ul>
|
<div><ul>
|
||||||
|
{% include "auto/status-updates.html" %}
|
||||||
{% for page in section.pages %}
|
{% for page in section.pages %}
|
||||||
<li><b><a href="/{{ page.path | safe }}">{{ page.title }}</a></b></li>
|
<li><b><a href="/{{ page.path | safe }}">{{ page.title }}</a></b></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user