Have "Edit on GitHub" point to master instead of gh-pages

Summary:
If someone clicks on `Edit on GitHub` to edit a doc for a pull request, for example,
then we should point to `master` instead of `gh-pages`.

> Also fixed some Windows-based line endings. From CRLF to LF.

Test Plan: https://www.facebook.com/pxlcld/pvV2

Reviewers: IslamAbdelRahman, lgalanis, sdong

Reviewed By: sdong

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D63435
main
Joel Marcey 8 years ago
parent 9377518981
commit 2d9d36ea46
  1. 50
      docs/_includes/doc.html

@ -1,25 +1,25 @@
<div class="post">
<header class="post-header">
<h1 class="post-title">{% if include.truncate %}<a href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a>{% else %}{{ page.title }}{% endif %}</h1>
</header>
<article class="post-content">
{% if include.truncate %}
{% if page.content contains '<!--truncate-->' %}
{{ page.content | split:'<!--truncate-->' | first }}
<div class="read-more">
<a href="{{ site.url }}{{ site.baseurl }}{{ page.url }}" >
...Read More
</a>
</div>
{% else %}
{{ page.content }}
{% endif %}
{% else %}
{{ content }}
<p><a class="edit-page-link" href="https://github.com/{{ site.ghrepo }}/tree/gh-pages/{{ page.path }}" target="_blank">Edit on GitHub</a></p>
{% endif %}
</article>
{% include doc_paging.html %}
</div>
<div class="post">
<header class="post-header">
<h1 class="post-title">{% if include.truncate %}<a href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a>{% else %}{{ page.title }}{% endif %}</h1>
</header>
<article class="post-content">
{% if include.truncate %}
{% if page.content contains '<!--truncate-->' %}
{{ page.content | split:'<!--truncate-->' | first }}
<div class="read-more">
<a href="{{ site.url }}{{ site.baseurl }}{{ page.url }}" >
...Read More
</a>
</div>
{% else %}
{{ page.content }}
{% endif %}
{% else %}
{{ content }}
<p><a class="edit-page-link" href="https://github.com/{{ site.ghrepo }}/blob/master/docs/{{ page.path }}" target="_blank">Edit on GitHub</a></p>
{% endif %}
</article>
{% include doc_paging.html %}
</div>

Loading…
Cancel
Save