{% if target.repository is defined %}
{% if target.github_branch is undefined %} {% set gh_branch = "master" %} {% else %} {% set gh_branch = target.github_branch %} {% endif %} {% set have_edit_link = False %} {% if currentpage.md is defined %} {% if currentpage.md.startswith("http://") or currentpage.md.startswith("https://") %} {# Leave have_edit_link = False #} {% else %} {% set have_edit_link = True %} {% set githuburl = target.repository + "/edit/" + gh_branch + "/" + config.content_path + "/" + currentpage.md %} {% endif %} {% elif currentpage.template is defined %} {% set have_edit_link = True %} {% set githuburl = target.repository + "/edit/" + gh_branch + "/"+ config.template_path + "/" + currentpage.template %} {% endif %} {% if not have_edit_link %} {% set githuburl = target.repository %} {% endif %} {% trans %}Edit{% endtrans %}
{% endif %}