Remove file urls from files.json

This commit is contained in:
Scott Shawcroft 2020-11-17 17:08:06 -08:00
parent 1cd85322a2
commit f17b3043a7
No known key found for this signature in database
GPG key ID: 0DFD512649C052DA
3 changed files with 18 additions and 20239 deletions

File diff suppressed because it is too large Load diff

View file

@ -23,9 +23,14 @@
<div class="download-details">
<label class="language-select">
<select>
{% for file in version.files %}
<option value="{{ file[1] | join: ',' }}" data-files={{ file[1] | join: ',' }} data-locale={{ file[0] | replace: '_', '-' }} {% if file[0] == "en_US" %}selected{% endif %}>
{% case file[0] %}
{% for language in version.languages %}
{% capture prefix %}https://downloads.circuitpython.org/bin/{{ page.board_id}}/{{ language }}/adafruit-circuitpython-{{ page.board_id }}-{{ language }}-{{ version.version }}{% endcapture %}
{% capture files %}{% for ext in version.extensions %}{{ prefix }}.{{ext}}{% if forloop.last == false %},{% endif %}{% endfor %}{% endcapture %}
<option value={{ files }}
data-files={{ files }}
data-locale={{ language | replace: '_', '-' }}
{% if language == "en_US" %}selected{% endif %}>
{% case language %}
{% when 'cs' %}
CZECH
{% when 'de_DE' %}
@ -40,10 +45,16 @@
FILIPINO
{% when 'fr' %}
FRENCH
{% when 'el' %}
GREEK
{% when 'hi' %}
HINDI
{% when 'ID' %}
INDONESIAN
{% when 'it_IT' %}
ITALIAN
{% when 'ja' %}
JAPANESE
{% when 'ko' %}
KOREAN
{% when 'nl' %}
@ -64,8 +75,8 @@
</select>
</label>
<div class="download-buttons">
{% for file in version.files['en_US'] %}
<a class="download-button {% if version.stable %}stable{% else %}unstable{% endif %} {{ file | slice: -3, 3 }}" href="{{ file }}">DOWNLOAD {{ file | slice: -4, 4 | upcase }} NOW <i class="fas fa-download" aria-hidden="true"></i></a>
{% for extension in version.extensions %}
<a class="download-button {% if version.stable %}stable{% else %}unstable{% endif %} {{ extension }}" href="{{ prefix }}/en_US/adafruit-circuitpython-{{ page.board_id }}-en_US-{{ version.version }}.{{ extension }}">DOWNLOAD .{{ extension | upcase }} NOW <i class="fas fa-download" aria-hidden="true"></i></a>
{% endfor %}
</div>
</div>

View file

@ -78,7 +78,7 @@ permalink: /downloads
<div class="downloads-section">
{% comment %}
The following are boards that are in the _data/files.json build
process. Seperate loops due to wanting to sort by download count first.
process. Separate loops due to wanting to sort by download count first.
{% endcomment %}
{% assign boards = site.data.files | sort: "downloads" | reverse %}
{% for board in boards %}