summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-07-07 15:33:06 -0700
committerRich Trott <rtrott@gmail.com>2018-07-13 20:37:05 -0700
commit61cd101e128238ba52b333e99fc5b0e948e13de5 (patch)
tree65778a42a7975c11990f33aa03e61e9f52ab8123 /doc
parent6d60c930565710d6cbc77521a2cd94d272986646 (diff)
downloadandroid-node-v8-61cd101e128238ba52b333e99fc5b0e948e13de5.tar.gz
android-node-v8-61cd101e128238ba52b333e99fc5b0e948e13de5.tar.bz2
android-node-v8-61cd101e128238ba52b333e99fc5b0e948e13de5.zip
doc: add "Edit on GitHub" link
Proof of concept for an "Edit on GitHub" link, inspired by the Serverless docs. One issue is that the link is to the version of the docs on the master branch even if the person was reading a different version of the doc. I don't consider that a big problem, although we can always remove the link if it turns out to be a big problem. I don't think there is a good solution. PRs need to be opened against the master branch generally. Having a bunch of PRs against staging branches is probably not what we want. If there's an update to one version of the doc, there will usually be an update to other versions. PR-URL: https://github.com/nodejs/node/pull/21703 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/api_assets/style.css5
-rw-r--r--doc/template.html1
2 files changed, 6 insertions, 0 deletions
diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css
index b4da3375d5..f59f377004 100644
--- a/doc/api_assets/style.css
+++ b/doc/api_assets/style.css
@@ -504,6 +504,11 @@ th > *:last-child, td > *:last-child {
visibility: hidden;
}
+.github_icon {
+ vertical-align: middle;
+ margin: -2px 3px 0 0;
+}
+
@media only screen and (max-width: 1024px) {
#content {
overflow: visible;
diff --git a/doc/template.html b/doc/template.html
index bb3e2bf8b4..fdcf0d5821 100644
--- a/doc/template.html
+++ b/doc/template.html
@@ -35,6 +35,7 @@
<a href="__FILENAME__.json">View as JSON</a>
</li>
__ALTDOCS__
+ __EDIT_ON_GITHUB__
</ul>
</div>
<hr>