Skip to content

Commit 121529b

Browse files
committed
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.
1 parent dd3167e commit 121529b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

docs/_css/react.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,19 @@ figure {
566566
margin: 0 auto;
567567
}
568568

569+
h1 {
570+
// Contains .edit-page-link
571+
@include clearfix;
572+
}
573+
574+
.edit-page-link {
575+
float: right;
576+
font-size: 16px;
577+
font-weight: normal;
578+
line-height: 20px;
579+
margin-top: 17px;
580+
}
581+
569582
/* Blog */
570583

571584
.post-list-item + .post-list-item {

docs/_layouts/docs.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
{% include nav_docs.html %}
88

99
<div class="inner-content">
10-
<h1>{{ page.title }}</h1>
10+
<h1>
11+
{{ page.title }}
12+
<a class="edit-page-link" href="https://github.com/facebook/react/tree/master/docs/{{ page.path }}" target="_blank">Edit on GitHub</a>
13+
</h1>
1114
<div class="subHeader">{{ page.description }}</div>
15+
1216
{{ content }}
1317

1418
<div class="docs-prevnext">

0 commit comments

Comments
 (0)