Skip to content

Commit 7c60da6

Browse files
committed
Remove source link for remote repos (fixes #559)
1 parent ba1b098 commit 7c60da6

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

_includes/footer.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
{%- capture edit_link -%}{% github_edit_link "source" %}{%- endcapture -%}
2-
{%- if page.paginated and paginator.page > 1 -%}
3-
{%- assign first_page = site.pages | where_exp: 'p','p.paginated == true' | sort: 'path' | first -%}
4-
{%- assign edit_link = edit_link | replace: page.path, first_page.path -%}
5-
{%- endif -%}
1+
{%- unless site.remote_theme -%}
2+
{%- capture edit_link -%}{% github_edit_link "source" %}{%- endcapture -%}
3+
4+
{%- if page.paginated and paginator.page > 1 -%}
5+
{%- assign first_page = site.pages | where_exp: 'p','p.paginated == true' | sort: 'path' | first -%}
6+
{%- assign edit_link = edit_link | replace: page.path, first_page.path -%}
7+
{%- endif -%}
8+
{%- endunless -%}
9+
610
<footer>
711
<div class="container">
812
<p class="copy">
913
&copy; <a href="{{ site.github.owner_url }}/{{ site.github.owner_name }}.github.io#licence">{{ site.time | date: '%Y' }} {{ site.title }}</a>.
1014
<span class="powered">Powered by <a href="https://jekyllrb.com">Jekyll</a> / <a href="https://pages.github.com/">GitHub Pages</a>
11-
<span class="source-link">({{ edit_link | replace_first: '/edit/','/blob/' }})</span></span>
15+
{%- unless site.remote_theme %} <span class="source-link">({{ edit_link | replace_first: '/edit/','/blob/' }})</span>{%- endunless -%}
16+
</span>
1217
</p>
1318

1419
<div class="footer-links">

0 commit comments

Comments
 (0)