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 <ahmetb@google.com>pull/2924/head
parent
6f8c97f4d2
commit
7cdcff7813
|
@ -13,6 +13,8 @@ $( document ).ready(function() {
|
||||||
$("#continueEdit").show();
|
$("#continueEdit").show();
|
||||||
$("#continueEditButton").text("Edit " + forwarding);
|
$("#continueEditButton").text("Edit " + forwarding);
|
||||||
$("#continueEditButton").attr("href", "https://github.com/kubernetes/kubernetes.github.io/edit/master/" + 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 {
|
} else {
|
||||||
$("#generalInstructions").show();
|
$("#generalInstructions").show();
|
||||||
$("#continueEdit").hide();
|
$("#continueEdit").hide();
|
||||||
|
@ -26,6 +28,7 @@ $( document ).ready(function() {
|
||||||
<p>Click the button below to edit the page you were just on. When you are done, click <b>Commit Changes</b> at the bottom of the screen. This creates a copy of our site in your GitHub account called a <i>fork</i>. 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 <b>New Pull Request</b> to let us know about it.</p>
|
<p>Click the button below to edit the page you were just on. When you are done, click <b>Commit Changes</b> at the bottom of the screen. This creates a copy of our site in your GitHub account called a <i>fork</i>. 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 <b>New Pull Request</b> to let us know about it.</p>
|
||||||
|
|
||||||
<p><a id="continueEditButton" class="button"></a></p>
|
<p><a id="continueEditButton" class="button"></a></p>
|
||||||
|
<p><a id="viewOnGithubButton" class="button"></a></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="generalInstructions">
|
<div id="generalInstructions">
|
||||||
|
|
Loading…
Reference in New Issue