Skip to content

Commit 3c639dc

Browse files
authored
Fix #330: Markdown changelog links (#333)
Fix links in the download page template and in one blog post to link to changelog.md rather than changelog.txt for versions released after this change was made in OpenTTD.
1 parent 55e4def commit 3c639dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

_layouts/download.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ <h3>Download {{ page.name }}</h3>
3434
<div class="content">
3535
<p>Latest {{ page.name }} release in {{ page.category }} is {{ page.version }}, released on {{ page.date | date: "%Y-%m-%d %H:%M" }} UTC.</p>
3636

37+
{% assign markdowndate = '2024-10-22' | date: '%s' %}
38+
{% assign versiondate = page.date | date: '%s' %}
39+
{% if versiondate > markdowndate && raw_type contains "openttd" %}
40+
<div class="changelog">[&nbsp;<a href="https://cdn.openttd.org/{{ folder }}/changelog.md">Changelog</a>&nbsp;]</div>
41+
{% else %}
3742
<div class="changelog">[&nbsp;<a href="https://cdn.openttd.org/{{ folder }}/changelog.txt">Changelog</a>&nbsp;]</div>
43+
{% endif %}
3844
<div id="download-combo">
3945
<input type="hidden" id="download-combo-state" value="" />
4046
<input type="hidden" id="download-base-name" value="{{ page.base }}" />

0 commit comments

Comments
 (0)