Giter Site home page Giter Site logo

joe-sky / gitbook-plugin-versions-select Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prescottprue/gitbook-plugin-versions-select

0.0 1.0 0.0 33 KB

A gitbook plugin that provides a version dropdown. Works with multiple versions on one domain.

License: Apache License 2.0

CSS 7.24% JavaScript 92.76%

gitbook-plugin-versions-select's Introduction

gitbook-plugin-versions-select

NPM version NPM downloads License Code Style

This is a modified version of Versions

Display a <select> with other versions of your gitbook that you have specified in your book.json file.

Usage with gitbook.com

When your book is hosted on GitBook.com, the plugin can access a listing of versions using the GitBook API.

Put this in your book.json:

{
  "plugins": [ "versions-select" ],
  "pluginsConfig": {
    "versions": {
      "gitbookConfigURL": "https://raw.githubusercontent.com/prescottprue/react-redux-firebase/v2.0.0/book.json",
      "options": [
        {
          "value": "http://react-redux-firebase.com/history/v1.4.0/",
          "text": "Version v1.4.0"
        },
        {
          "value": "http://react-redux-firebase.com/history/v1.4.0/",
          "text": "Version v2.0.0"
        }
      ]
    }
  }
}

A <select> 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.

The 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.

FAQ

  1. How is this different than gitbook-plugin-versions

The active version selected in the <select> is based location.

  1. How is this different than gitbook-plugin-feathers-versions?

Versions on the same domain under different folders are supported

Credits

Original work by @mjackson.

License

Apache 2

gitbook-plugin-versions-select's People

Contributors

joe-sky avatar prescottprue avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.