Skip to content

Commit

Permalink
Fix #330: Markdown changelog links (#333)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
merni-ns authored Dec 25, 2024
1 parent 55e4def commit 3c639dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _layouts/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ <h3>Download {{ page.name }}</h3>
<div class="content">
<p>Latest {{ page.name }} release in {{ page.category }} is {{ page.version }}, released on {{ page.date | date: "%Y-%m-%d %H:%M" }} UTC.</p>

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

0 comments on commit 3c639dc

Please sign in to comment.