From 101745c6a4a2c6a186be48182d48814177840c65 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Thu, 29 Nov 2018 23:14:58 +0100 Subject: :construction: Chenged things, and written some docs --- docs/_book/gitbook/gitbook-plugin-github/plugin.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/_book/gitbook/gitbook-plugin-github/plugin.js (limited to 'docs/_book/gitbook/gitbook-plugin-github/plugin.js') diff --git a/docs/_book/gitbook/gitbook-plugin-github/plugin.js b/docs/_book/gitbook/gitbook-plugin-github/plugin.js new file mode 100644 index 0000000..14810ce --- /dev/null +++ b/docs/_book/gitbook/gitbook-plugin-github/plugin.js @@ -0,0 +1,14 @@ +require([ 'gitbook' ], function (gitbook) { + gitbook.events.bind('start', function (e, config) { + var githubURL = config.github.url; + + gitbook.toolbar.createButton({ + icon: 'fa fa-github', + label: 'GitHub', + position: 'right', + onClick: function() { + window.open(githubURL) + } + }); + }); +}); -- cgit v1.2.3