{"id":19501227,"url":"https://github.com/gitbookio/plugin-versions","last_synced_at":"2025-08-03T20:33:39.407Z","repository":{"id":36749044,"uuid":"41055667","full_name":"GitbookIO/plugin-versions","owner":"GitbookIO","description":"Display a \u003cselect\u003e with other versions of your gitbook","archived":false,"fork":false,"pushed_at":"2017-03-16T18:23:22.000Z","size":16,"stargazers_count":15,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T23:34:14.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GitbookIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-19T19:35:44.000Z","updated_at":"2023-09-08T17:00:45.000Z","dependencies_parsed_at":"2022-09-07T09:01:12.138Z","dependency_job_id":null,"html_url":"https://github.com/GitbookIO/plugin-versions","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/GitbookIO/plugin-versions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-versions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-versions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-versions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-versions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitbookIO","download_url":"https://codeload.github.com/GitbookIO/plugin-versions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-versions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268607836,"owners_count":24277635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T22:11:56.035Z","updated_at":"2025-08-03T20:33:39.318Z","avatar_url":"https://github.com/GitbookIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## gitbook-plugin-versions\n\nDisplay a `\u003cselect\u003e` with other versions of your gitbook.\n\n### Usage with gitbook.com\n\nWhen your book is hosted on [GitBook.com](https://www.gitbook.com), the plugin can access a listing of versions using the [GitBook API](http://developer.gitbook.com/books/versions/).\n\nPut this in your book.json:\n\n```js\n{\n    \"plugins\": [ \"versions\" ],\n    \"pluginsConfig\": {\n        \"versions\": {\n            \"type\": \"branches\"\n        }\n    }\n}\n```\n\nType can have different values:\n\n- Branches (`branches`)\n- Tags (`tags`)\n- Languages (`languages`)\n\n### Usage with a manual configuration\n\nPut this in your book.json:\n\n```js\n{\n    \"plugins\": [ \"versions\" ],\n    \"pluginsConfig\": {\n        \"versions\": {\n            \"gitbookConfigURL\": \"https://raw.githubusercontent.com/rackt/history/gh-pages/book.json\",\n            \"options\": [\n                {\n                    \"value\": \"https://rackt.github.io/history/v1.3.0/\",\n                    \"text\": \"Version 1.3.0\"\n                },\n                {\n                    \"value\": \"https://rackt.github.io/history/v1.4.0/\",\n                    \"text\": \"Version 1.4.0\",\n                    \"selected\": true\n                }\n            ]\n        }\n    }\n}\n```\n\nA `\u003cselect\u003e` element will be created with the given `options` and placed at the top of the book summary. When the user selects one of the options, they are taken to that URL.\n\nThe `gitbookConfigURL` variable is a publicly accessible URL to your `book.json`. If this is present, the plugin will fetch the latest config when the page loads, so even older versions of your book will have updated `options`.\n\n### Credits\n\nOriginal work by [@mjackson](https://github.com/mjackson).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fplugin-versions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitbookio%2Fplugin-versions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fplugin-versions/lists"}