|
1 | | -{#- Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} |
2 | | - |
3 | | -{%- if page_source_suffix %} |
4 | | - {%- set suffix = page_source_suffix %} |
5 | | -{%- else %} |
6 | | - {%- set suffix = source_suffix %} |
7 | | -{%- endif %} |
8 | | - |
9 | 1 | {%- if meta is defined and meta is not none %} |
10 | 2 | {%- set check_meta = True %} |
11 | 3 | {%- else %} |
|
43 | 35 | <!-- User defined GitHub URL --> |
44 | 36 | <a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> |
45 | 37 | {%- else %} |
46 | | - <a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> |
| 38 | + <a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> |
47 | 39 | {%- endif %} |
48 | 40 | {%- elif display_bitbucket %} |
49 | 41 | {%- if check_meta and 'bitbucket_url' in meta %} |
50 | 42 | <!-- User defined Bitbucket URL --> |
51 | 43 | <a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> |
52 | 44 | {%- else %} |
53 | | - <a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> |
| 45 | + <a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> |
54 | 46 | {%- endif %} |
55 | 47 | {%- elif display_gitlab %} |
56 | 48 | {%- if check_meta and 'gitlab_url' in meta %} |
57 | 49 | <!-- User defined GitLab URL --> |
58 | 50 | <a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> |
59 | 51 | {%- else %} |
60 | | - <a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> |
| 52 | + <a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> |
61 | 53 | {%- endif %} |
62 | 54 | {%- elif show_source and source_url_prefix %} |
63 | | - <a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a> |
| 55 | + <a href="{{ source_url_prefix }}{{ pagename }}{{ page_source_suffix }}">{{ _('View page source') }}</a> |
64 | 56 | {%- elif show_source and has_source and sourcename %} |
65 | 57 | <a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a> |
66 | 58 | {%- endif %} |
|
0 commit comments