Add "Edit on GitHub" link on docs pages

Ember's docs do this and I rather like the idea of encouraging people to make improvements.
This commit is contained in:
Ben Alpert 2014-07-15 23:00:23 -07:00
parent dd3167edc9
commit 121529bdfd
2 changed files with 18 additions and 1 deletions

View File

@ -566,6 +566,19 @@ figure {
margin: 0 auto;
}
h1 {
// Contains .edit-page-link
@include clearfix;
}
.edit-page-link {
float: right;
font-size: 16px;
font-weight: normal;
line-height: 20px;
margin-top: 17px;
}
/* Blog */
.post-list-item + .post-list-item {

View File

@ -7,8 +7,12 @@ sectionid: docs
{% include nav_docs.html %}
<div class="inner-content">
<h1>{{ page.title }}</h1>
<h1>
{{ page.title }}
<a class="edit-page-link" href="https://github.com/facebook/react/tree/master/docs/{{ page.path }}" target="_blank">Edit on GitHub</a>
</h1>
<div class="subHeader">{{ page.description }}</div>
{{ content }}
<div class="docs-prevnext">