Make edit links GitHub aware (#5038)

* Make edit links GitHub aware

* Fix repo url

* don't mutate existing string

* Move comment

* Fix url
This commit is contained in:
Paulus Schoutsen 2018-03-28 00:18:38 -07:00 committed by Fabian Affolter
parent 88c8cc2ff1
commit 9cc2bce761
2 changed files with 18 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{% assign url_parts = page.url | split: '/' %}
{% if page.hide_github_edit != true %}
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/{{ page.path }}'>Edit this page on GitHub</a></div>
<div class='edit-github'><a href='{{ site.NLY_REPOSITORY_URL }}/tree/{{ site.NLY_HEAD }}/source/{{ page.path }}'>Edit this page on GitHub</a></div>
{% endif %}