Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support arbitrary source URLs, closes #87 #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions alabaster/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,14 @@
{% endif %}
{%- if show_source and has_source and sourcename %}
{% if show_copyright or theme_show_powered_by %}|{% endif %}
{%- if source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ source_suffix }}"
rel="nofollow">{{ _('Page source') }}</a>
{%- else %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
rel="nofollow">{{ _('Page source') }}</a>
{%- endif %}
{%- endif %}
</div>

{% if theme_github_banner|lower != 'false' %}
Expand Down
1 change: 1 addition & 0 deletions alabaster/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ show_relbars = false
sidebar_collapse = true
sidebar_includehidden = true
sidebar_width = 220px
source_url_prefix =
tidelift_url =
touch_icon =
travis_button = false
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Changelog
=========

- :feature:`87` Add support for arbitrary "edit source" link
targets. Credit: ``@anarcat``.
- :release:`0.7.12 <2018-10-02>`
- :bug:`-` On some browsers/platforms, 'badge'-style sidebar elements were
displaying dotted underlines. This was unintentional and explicit styling has
Expand Down