{# Extend the RTD template to include "Edit on Github" and option to download
notebook generated pages from nbsphinx #}
{% extends "!breadcrumbs.html" %}
{% block breadcrumbs_aside %}
{% if hasdoc(pagename) %}
{% if pagename.startswith("api/generated") or suffix == ".ipynb" %}
{% set title = "Suggested improvement for " + pagename %}
{% set body = "Please describe what could be improved about this page or the typo/mistake that you found:" %}
Improve this page
{% elif pagename.split("/")[0] in galleries %}
{% set gallery_path = gallery_dir[pagename.split("/")[0]] %}
{% set example_script = pagename|replace(pagename.split("/")[0], gallery_dir[pagename.split("/")[0]]) %}
{% if pagename.split("/")[-1] == "index" %}
{% set example_script = example_script|replace("index", "README.txt") %}
{% else %}
{% set example_script = example_script + ".py" %}
{% endif %}
Improve this page
{% else %}
Improve this page
{% endif %}
{% endif %}
{% if suffix == ".ipynb" %}
Download notebook
{% endif %}