{% from "basic-ng/components/edit-this-page.html" import determine_page_edit_link with context %} {%- macro furo_edit_button(url) -%}
{{ _("Edit this page") }}
{%- endmacro -%} {%- if theme_source_repository -%} {%- if not theme_source_branch -%} {{ warning("Provided `source_repository` but not `source_branch`. ")}} {%- endif -%} {%- if page_source_suffix -%} {{ furo_edit_button(determine_page_edit_link()) }} {%- endif -%} {%- elif READTHEDOCS and conf_py_path and page_source_suffix and github_user != "None" and github_repo != "None" and github_version %} {% set url = "https://github.com/" + github_user + "/" + github_repo + "/edit/" + github_version + conf_py_path + pagename + page_source_suffix %} {{ furo_edit_button(url) }} {%- endif -%}