{# To be used in footer.html #}
{#- NB: "sourcename" is set to the empty string if html_copy_source is False, but it is undefined if there is no source file! #}
{%- if show_source and sourcename is defined %}
{%- if has_source %}
{%- if sourcename == '' %}
{#- No source link. This may happen in the "singlehtml" builder. #}
{%- else %}
{{ _('Show Source') }}.
{%- endif %}
{%- elif page_source_suffix is not defined %}
{#- No source link. This may happen in the "singlehtml" builder. #}
{%- elif display_bitbucket|tobool and bitbucket_user and bitbucket_repo and commit and conf_py_path %}
{{ _('Show Source') }} (Bitbucket).
{%- elif display_github|tobool and github_user and github_repo and commit and conf_py_path %}
{{ _('Show Source') }} (Github).
{%- elif display_gitlab|tobool and gitlab_user and gitlab_repo and commit and conf_py_path %}
{{ _('Show Source') }} (GitLab).
{%- endif %}
{%- endif %}