- <li><a href="{{ site.github.url }}/reference/">Reference</a></li>
- {% endif %}
- <li><a href="{{ site.github.url }}/license/">License</a></li>
+ {% endif %}
+
+ {% comment %} Always show license. {% endcomment %}
+ <li><a href="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
+ {% if page.source %}
+ {% if page.source == "Rmd" %}
+ <li><a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
+ {% endif %}
+ {% else %}
+ <li><a href="{{repo_url}}/edit/{{ default_branch}}/{{page.path}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
+ {% endif %}