From 121529bdfd54150ed4a3c8f5e6b7cf668e4ccd4e Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Tue, 15 Jul 2014 23:00:23 -0700 Subject: [PATCH] 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. --- docs/_css/react.scss | 13 +++++++++++++ docs/_layouts/docs.html | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/_css/react.scss b/docs/_css/react.scss index 6bfe5c86a2..ce8c3da220 100644 --- a/docs/_css/react.scss +++ b/docs/_css/react.scss @@ -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 { diff --git a/docs/_layouts/docs.html b/docs/_layouts/docs.html index bda55583cf..f5bca3674b 100644 --- a/docs/_layouts/docs.html +++ b/docs/_layouts/docs.html @@ -7,8 +7,12 @@ sectionid: docs {% include nav_docs.html %}
-

{{ page.title }}

+

+ {{ page.title }} + Edit on GitHub +

{{ page.description }}
+ {{ content }}