Retrieve latest release from releases collection

This commit is contained in:
jklingen 2016-07-27 23:12:13 +02:00
commit 142beee2a0

View file

@ -7,19 +7,18 @@ permalink: /downloads/
comments: [] comments: []
tags: menu tags: menu
--- ---
{% assign latestRelease = site.github.releases | first %} {% assign latestRelease = site.github.releases | where:"prerelease",false | first %}
<!-- TODO retrieve downloadable files -->
<div class="two-col left-box"> <div class="two-col left-box">
<h2>Download the latest stable release</h2> <h2>Download the latest stable release</h2>
<table class="cta-button"> <table class="cta-button">
<tr> <tr>
<td> <td>
{% for asset in latestRelease.assets %} {% for asset in latestRelease.assets %}
{% if asset.name contains 'RELEASE.exe' %} {% if asset.name contains 'RELEASE.exe' %}
<a href="{{ asset.browser_download_url }}" class="cta" title="Download the latest stable version of Greenshot" rel="nofollow" style="display:table-cell">Latest version</a> <a href="{{ asset.browser_download_url }}" class="cta" title="Download the latest stable version of Greenshot" rel="nofollow" style="display:table-cell">Latest version</a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</td> </td>
</tr> </tr>
<tr> <tr>