From 7cdcff78137b3b641f1ac8a0d27b78f739fcaa8d Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Mon, 20 Mar 2017 12:49:47 -0700 Subject: [PATCH] View $PAGE on Github without forking the repo Adding a "View docs/bla-bla.md on GitHub" button next to the "Edit docs/bla-bla.md" button so that people can view the file first without clicking the Edit button (which does not work without forking the repository). I did not need this because I was trying to do something without forking. I just found it to be bit difficult to view source of a page on GitHub. I'm open to ideas, perhaps we can instead add an article footer button named "View on GitHub" next to the "Edit this Page". Signed-off-by: Ahmet Alp Balkan --- editdocs.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editdocs.md b/editdocs.md index b089db1c43..0a5ff53c88 100644 --- a/editdocs.md +++ b/editdocs.md @@ -13,6 +13,8 @@ $( document ).ready(function() { $("#continueEdit").show(); $("#continueEditButton").text("Edit " + forwarding); $("#continueEditButton").attr("href", "https://github.com/kubernetes/kubernetes.github.io/edit/master/" + forwarding) + $("#viewOnGithubButton").text("View " + forwarding + " on GitHub"); + $("#viewOnGithubButton").attr("href", "https://github.com/kubernetes/kubernetes.github.io/tree/master/" + forwarding) } else { $("#generalInstructions").show(); $("#continueEdit").hide(); @@ -26,6 +28,7 @@ $( document ).ready(function() {

Click the button below to edit the page you were just on. When you are done, click Commit Changes at the bottom of the screen. This creates a copy of our site in your GitHub account called a fork. You can make other changes in your fork after it is created, if you want. When you are ready to send us all your changes, go to the index page for your fork and click New Pull Request to let us know about it.

+