Adds link to edit pages directly on GH
Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/697d0db2 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/697d0db2 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/697d0db2 Branch: refs/heads/master Commit: 697d0db23077d4a2c12ef5521869a1e42370ad1f Parents: 17e6407 Author: Lukasz Lenart <[email protected]> Authored: Mon Jun 12 21:03:09 2017 +0200 Committer: Lukasz Lenart <[email protected]> Committed: Mon Jun 12 21:03:09 2017 +0200 ---------------------------------------------------------------------- _config.yml | 3 +++ source/_layouts/getting-started.html | 1 + source/css/custom.css | 12 ++++++++++++ 3 files changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts-site/blob/697d0db2/_config.yml ---------------------------------------------------------------------- diff --git a/_config.yml b/_config.yml index 7429068..37691cd 100644 --- a/_config.yml +++ b/_config.yml @@ -18,3 +18,6 @@ current_beta_version_short: 25B3 release_date: 7 March 2017 release_date_short: 20170307 beta_release_date_short: 20160126 + +# Allows to directly edit pages on GitHub +repository_url: https://github.com/apache/struts-site http://git-wip-us.apache.org/repos/asf/struts-site/blob/697d0db2/source/_layouts/getting-started.html ---------------------------------------------------------------------- diff --git a/source/_layouts/getting-started.html b/source/_layouts/getting-started.html index dd1e9e9..7fc3035 100644 --- a/source/_layouts/getting-started.html +++ b/source/_layouts/getting-started.html @@ -26,6 +26,7 @@ <article class="container"> <section class="col-md-12"> <a href="index.html" title="back to Getting Started"><< back to Getting Started</a> + <a class="edit-on-gh" href="{{ site.repository_url }}/edit/master/source/{{ page.path }}" title="Edit this page on GitHub">Edit on GitHub</a> {{ content }} </section> </article> http://git-wip-us.apache.org/repos/asf/struts-site/blob/697d0db2/source/css/custom.css ---------------------------------------------------------------------- diff --git a/source/css/custom.css b/source/css/custom.css index f135a81..321c906 100644 --- a/source/css/custom.css +++ b/source/css/custom.css @@ -29,3 +29,15 @@ a.anchor { margin-top: -94px; visibility: hidden; } + +.edit-on-gh { + position: absolute; + right: 0; + top: 0; + + display: block; + padding: 4px 16px; + + background-color: #AA0000; + color: #fff; +}
