Skip to content

Commit ac9adc3

Browse files
committed
support arbitrary source URLs, closes #87
1 parent 1c3393d commit ac9adc3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

alabaster/layout.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,14 @@
5151
{% endif %}
5252
{%- if show_source and has_source and sourcename %}
5353
{% if show_copyright or theme_show_powered_by %}|{% endif %}
54+
{%- if source_url_prefix %}
55+
<a href="{{ source_url_prefix }}{{ pagename }}{{ source_suffix }}"
56+
rel="nofollow">{{ _('Page source') }}</a>
57+
{%- else %}
5458
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
5559
rel="nofollow">{{ _('Page source') }}</a>
5660
{%- endif %}
61+
{%- endif %}
5762
</div>
5863

5964
{% if theme_github_banner|lower != 'false' %}

0 commit comments

Comments
 (0)