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
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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>
	/
+6 −0
Original line number Diff line number Diff line
@@ -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">