Add versions dropdown to the documentation
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/8203853f Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/8203853f Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/8203853f Branch: refs/heads/master Commit: 8203853ff437d786d37ce1872fe990793a287f66 Parents: 13e54ed Author: Thomas Bouron <[email protected]> Authored: Thu Oct 12 10:33:33 2017 +0100 Committer: Thomas Bouron <[email protected]> Committed: Mon Oct 16 14:56:04 2017 +0100 ---------------------------------------------------------------------- book.json | 29 ++++++++++++++++++++++++++++- guide/styles/website.less | 8 ++++++++ package-lock.json | 6 ++++++ package.json | 3 ++- 4 files changed, 44 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/8203853f/book.json ---------------------------------------------------------------------- diff --git a/book.json b/book.json index 7a98e03..b89b723 100644 --- a/book.json +++ b/book.json @@ -6,7 +6,8 @@ "theme-api", "collapsible-chapters", "bootstrap-callout", - "styles-less" + "styles-less", + "versions" ], "styles": { "website": "./styles/website.less", @@ -62,6 +63,32 @@ "name": "Tarball" } ] + }, + "versions": { + "gitbookConfigURL": "https://raw.githubusercontent.com/tbouron/brooklyn-docs/experiment/gitbook/book.json", + "options": [ + { + "value": "https://brooklyn.apache.org/v/latest/", + "text": "Latest", + "selected": true + }, + { + "value": "https://brooklyn.apache.org/v/0.12.0/", + "text": "Version 0.12.0" + }, + { + "value": "https://brooklyn.apache.org/v/0.11.0/", + "text": "Version 0.11.0" + }, + { + "value": "https://brooklyn.apache.org/v/0.10.0/", + "text": "Version 0.10.0" + }, + { + "value": "https://brooklyn.apache.org/v/0.9.0/", + "text": "Version 0.9.0" + } + ] } }, "variables": { http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/8203853f/guide/styles/website.less ---------------------------------------------------------------------- diff --git a/guide/styles/website.less b/guide/styles/website.less index f777f00..a683ab2 100644 --- a/guide/styles/website.less +++ b/guide/styles/website.less @@ -37,6 +37,14 @@ body { } } +.versions-select select { + border: 1px solid @border-color; + border-radius: 0; + font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + color: @text-color; +} + .book-summary ul.summary li.active > a, .markdown-section a, #book-search-results .search-results .has-results .search-results-item a { http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/8203853f/package-lock.json ---------------------------------------------------------------------- diff --git a/package-lock.json b/package-lock.json index 3eeb55b..fb19c00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -565,6 +565,12 @@ } } }, + "gitbook-plugin-versions": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/gitbook-plugin-versions/-/gitbook-plugin-versions-2.1.4.tgz", + "integrity": "sha1-IQ0LfWBpj3ONd2gWY5kq7E6xKIM=", + "dev": true + }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/8203853f/package.json ---------------------------------------------------------------------- diff --git a/package.json b/package.json index 237787e..5b57d04 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "gitbook-plugin-collapsible-chapters": "^0.1.8", "gitbook-plugin-include-highlight": "^0.2.1", "gitbook-plugin-styles-less": "^1.0.0", - "gitbook-plugin-theme-api": "^1.1.2" + "gitbook-plugin-theme-api": "^1.1.2", + "gitbook-plugin-versions": "^2.1.4" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1",
