mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-29 09:12:35 -04:00
Add option to link to GitHub release.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user