Add option to link to GitHub release.

This commit is contained in:
Orne Brocaar
2016-06-29 18:14:25 +02:00
parent 57f51f3a3d
commit 56d252c6bb
4 changed files with 45 additions and 9 deletions

View File

@@ -41,11 +41,19 @@
{% if repo_name == "GitHub" and repo_url %}
<ul class="repo">
<li class="repo-download">
{% set version = config.extra.version | default("master") %}
<a href="{{ repo_url }}/archive/{{ version }}.zip" target="_blank"
title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
{% if config.extra.github.download_release %}
{% set version = config.extra.version | default("../latest") %}
<a href="{{ repo_url }}/releases/tag/{{ version }}" target="_blank"
title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
{% else %}
{% set version = config.extra.version | default("master") %}
<a href="{{ repo_url }}/archive/{{ version }}.zip" target="_blank"
title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
{% endif %}
</li>
<li class="repo-stars">
<a href="{{ repo_url }}/stargazers" target="_blank"