Skip to content

Commit 7878721

Browse files
authored
Turn board library lists into docs links
1 parent 62b41f6 commit 7878721

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

_includes/download/board.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,25 @@ <h3>CircuitPython {{ version.version }}</h3>
147147
{% if version.modules %}
148148
<p>
149149
Built-in modules available:
150-
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">{{ version.modules | join: ', ' }}</span>
150+
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">
151+
{% for module_name in version.modules %}
152+
<a class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{module_name}}">
153+
{{ module_name }}
154+
</a>{% if module_name != version.modules[version.modules.size - 1] %}, {% endif %}
155+
{% endfor %}
156+
</span>
151157
</p>
152158
{% endif %}
153159
{% if version.frozen_libraries and version.frozen_libraries.size != 0 %}
154160
<p>
155161
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:
156-
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">{{ version.frozen_libraries | join: ', ' }}</span>
162+
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">
163+
{% for module_name in version.frozen_libraries %}
164+
<a class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{module_name}}">
165+
{{ module_name }}
166+
</a>{% if module_name != version.frozen_libraries[version.frozen_libraries.size - 1] %}, {% endif %}
167+
{% endfor %}
168+
</span>
157169
</p>
158170
{% endif %}
159171
</div>

0 commit comments

Comments
 (0)