Skip to content

Commit fcd127c

Browse files
committed
Support . in library names and frozen modules
1 parent 7878721 commit fcd127c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

_includes/download/board.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ <h3>CircuitPython {{ version.version }}</h3>
149149
Built-in modules available:
150150
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">
151151
{% for module_name in version.modules %}
152-
<a class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{module_name}}">
152+
{% if module_name contains "." %}
153+
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{ module_name | split: '.' | first }}/#{{ module_name }}">
154+
{% else %}
155+
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{ module_name }}">
156+
{% endif %}
153157
{{ module_name }}
154158
</a>{% if module_name != version.modules[version.modules.size - 1] %}, {% endif %}
155159
{% endfor %}
@@ -161,7 +165,7 @@ <h3>CircuitPython {{ version.version }}</h3>
161165
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:
162166
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">
163167
{% for module_name in version.frozen_libraries %}
164-
<a class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{module_name}}">
168+
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/projects/{{ module_name | split: 'adafruit_' | last }}">
165169
{{ module_name }}
166170
</a>{% if module_name != version.frozen_libraries[version.frozen_libraries.size - 1] %}, {% endif %}
167171
{% endfor %}

0 commit comments

Comments
 (0)