Skip to content

Commit

Permalink
[Docs] add new download button
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebotu committed Aug 14, 2024
1 parent 831d478 commit 8e3159d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% extends "base.html" %}

{% block content %}
{% if page.nb_url %}
<a href="{{ page.nb_url }}" title="Download Notebook" class="md-content__button md-icon">
{% set path_parts = page.url.strip('/').split('/') %}
{% set last_part = path_parts[-1] %}
{% set notebook_url = page.url ~ last_part ~ '.ipynb' %}
<a href="{{ notebook_url | url }}" title="Download Notebook" class="md-content__button md-icon">
{% include ".icons/material/download.svg" %}
</a>

{% endif %}

{{ super() }}
{% endblock content %}
{% endblock content %}

0 comments on commit 8e3159d

Please sign in to comment.