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 9 years ago
parent 9377518981
commit 2d9d36ea46
  1. 50
      docs/_includes/doc.html

@ -1,25 +1,25 @@
<div class="post"> <div class="post">
<header class="post-header"> <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> <h1 class="post-title">{% if include.truncate %}<a href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a>{% else %}{{ page.title }}{% endif %}</h1>
</header> </header>
<article class="post-content"> <article class="post-content">
{% if include.truncate %} {% if include.truncate %}
{% if page.content contains '<!--truncate-->' %} {% if page.content contains '<!--truncate-->' %}
{{ page.content | split:'<!--truncate-->' | first }} {{ page.content | split:'<!--truncate-->' | first }}
<div class="read-more"> <div class="read-more">
<a href="{{ site.url }}{{ site.baseurl }}{{ page.url }}" > <a href="{{ site.url }}{{ site.baseurl }}{{ page.url }}" >
...Read More ...Read More
</a> </a>
</div> </div>
{% else %} {% else %}
{{ page.content }} {{ page.content }}
{% endif %} {% endif %}
{% else %} {% else %}
{{ content }} {{ 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> <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 %} {% endif %}
</article> </article>
{% include doc_paging.html %} {% include doc_paging.html %}
</div> </div>

Loading…
Cancel
Save