{%- if theme_github_repository and theme_github_branch %}
{%- if theme_github_sphinx_locale %}
{%- set localizationprefix = "Localization." + theme_github_sphinx_locale + "/" %}
{%- else %}
{%- set localizationprefix = "" %}
{%- endif %}
{%- if theme_path_to_documentation_dir %}
Edit on GitHub
{%- else %}
Edit on GitHub
{%- endif %}
{%- elif display_github and builder == 'html' %}
Edit on GitHub
{%- elif display_bitbucket and builder == 'html' %}
Edit on Bitbucket
{%- elif show_source and source_url_prefix %}
View source
{%- elif show_source and has_source and sourcename %}
View source
{%- endif %}
{%- if show_source and has_source and sourcename %}
View source
{%- endif %}
{%- endif %}