Skip to content
Snippets Groups Projects
Commit 15da8bb6 authored by Raniere Silva's avatar Raniere Silva
Browse files

Fix issue with link to GitHub from RMarkdown files

Jekyll doesn't export the _episodes_rmd so we need to flag the files.
Each Rmd file must have in the YAML header

    source: Rmd
parent 8874a3fe
No related merge requests found
......@@ -17,7 +17,13 @@
</div>
<div class="col-md-6" align="right">
<h4>
{% if page.source %}
{% if page.source == "Rmd" %}
<a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}">Edit on GitHub</a>
{% endif %}
{% else %}
<a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path}}">Edit on GitHub</a>
{% endif %}
/
<a href="{{ site.github.repository_url }}/blob/gh-pages/CONTRIBUTING.md">Contributing</a>
/
......
......@@ -76,7 +76,13 @@
{% comment %} Always show license. {% endcomment %}
<li><a href="{{ page.root }}/license/">License</a></li>
{% if page.source %}
{% if page.source == "Rmd" %}
<li><a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
{% endif %}
{% else %}
<li><a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path}}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
{% endif %}
</ul>
<form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
<div class="form-group">
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment