Skip to content

Commit a1d8677

Browse files
committed
Add /releases/latest redirect
1 parent e469842 commit a1d8677

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

content/releases/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
+++
2+
render = false
3+
+++

content/releases/latest.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
+++
2+
template = "latest.html"
3+
+++

templates/latest.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% set section = get_section(path="_index.md") -%}
2+
{%- for page in section.pages | reverse -%}{% if page.extra is containing("release") -%}
3+
<!DOCTYPE html>
4+
<meta charset="utf-8">
5+
<title>Redirect</title>
6+
<meta http-equiv="refresh" content="0; url={{ page.path | safe }}">
7+
<p><a href="{{ page.path | safe }}">Click here</a> to be redirected to the latest Rust release annoucement.</p>
8+
{% break %}{% endif %}{% endfor -%}

0 commit comments

Comments
 (0)