Skip to content

Commit e4d1ceb

Browse files
authored
Merge pull request #1717 from makermelissa/module-links
Add frozen module link exceptions
2 parents a0e61e5 + 012202a commit e4d1ceb

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

_data/modules.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"modules": {
3+
"stage": "https://circuitpython-stage.readthedocs.io/#module-stage",
4+
"ugame": "https://circuitpython-stage.readthedocs.io/#module-ugame",
5+
"adafruit_connection_manager": "https://docs.circuitpython.org/projects/connectionmanager/"
6+
}
7+
}

_includes/download/board.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
{% assign stable = board[0].versions | where: "stable", true | sort: "version" %}
88
{% assign unstable = board[0].versions | where: "stable", false | sort: "version" %}
99
{% assign bootloaders = site.data.bootloaders.bootloaders %}
10+
{% assign modules = site.data.modules.modules %}
1011
{% assign bootloader_info = bootloaders[page.family] %}
1112
{% assign bootloader_version = bootloader_info.version %}
1213
{% assign bootloader_id = page.bootloader_id %}
@@ -184,7 +185,12 @@ <h3>CircuitPython {{ version.version }}</h3>
184185
Included frozen<sup><a href="https://docs.circuitpython.org/en/latest/docs/reference/glossary.html?highlight=frozen#term-frozen-module" title="What is a frozen module">(?)</a></sup> modules:
185186
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">
186187
{% for module_name in version.frozen_libraries %}
188+
{% assign module_link = modules[module_name] %}
189+
{% if module_link %}
190+
<a target="_blank" class="library-link" href="{{ module_link }}">
191+
{% else %}
187192
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/projects/{{ module_name | split: 'adafruit_' | last }}">
193+
{% endif %}
188194
{{ module_name }}</a>{% unless forloop.last %}, {% endunless %}
189195
{% endfor %}
190196
</span>

0 commit comments

Comments
 (0)