{% extends "base.html" %} {% block content %} {{ super() }} {% if page.file.src_path.endswith(('.ipynb', '.py')) %}
{% set file_name = page.file.src_path.split('/')[-1] %} {% set page_name = page.file.src_path.split('/')[-1].replace('.ipynb', '').replace('.py', '') %} {% if page.file.src_path.endswith('.ipynb') %} Click here to download this notebook {% else %} Click here to download this script {% endif %}
{% endif %} {% endblock content %} {% block scripts %} {{ super() }} {% endblock scripts %}