{# Displays a link to the edit interface of the page source in the specified Version Control System. #}
{% if sourcename is defined and theme_use_edit_page_button==true and page_source_suffix %}
  {% set src = sourcename.split('.') %}
  {% if "ipynb" in src[-2:] %}
    <div class="tocsection editthispage">
      <a href="{{ get_edit_provider_and_url()[1] }}">
        <i class="fa-solid fa-download"></i>
        {% set provider = get_edit_provider_and_url()[0] %}
        {% block edit_this_page_text %}
          Download notebook
        {% endblock %}
      </a>
    </div>
  {% endif %}
{% endif %}