Socket
Socket
Sign inDemoInstall

gitbook-plugin-multilingual-index

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitbook-plugin-multilingual-index

customize multilingual home pages


Version published
Weekly downloads
4
decreased by-71.43%
Maintainers
1
Install size
414 kB
Created
Weekly downloads
 

Readme

Source

Welcome to gitbook-plugin-multilingual-index 👋

npm:version npm:download npm:prerequisite github:documentation github:maintenance npm:license github:snodreams1006 website:snodreams1006.tech 微信公众号:雪之梦技术驿站-brightgreen.svg

customize multilingual home pages

English | 中文

🏠 Homepage

Screenshot

multilingual-index-use-preview.png

Usage

Step #1 - Update book.json file

  1. In you gitbook's book.json file, add multilingual-index to plugins list.
  2. In pluginsConfig, Set enableSuper as false to disable default home page,and add index value to customize multilingual home pages. Only relative paths are supported.

Here is simplest example :

{
    "plugins": ["multilingual-index"],
    "pluginsConfig": {
        "multilingual-index": {
            "enableSuper": false,
            "index":"index.html"
        }
    }
}

Please refer to the following configuration item for more details :

"enableSuper": {
  "type": "boolean",
  "title": "inherit from super",
  "required": false,
  "default": true
},
"index": {
  "type": "string",
  "title": "default index path",
  "required": false
}

Step #2 - gitbook commands

  1. Run gitbook install. It will automatically install multilingual-index gitbook plugin for your book. This is needed only once.
gitbook install

or you can run npm install gitbook-plugin-multilingual-index to install locally.

npm install gitbook-plugin-multilingual-index
  1. Build your book (gitbook build) or serve (gitbook serve) as usual.
gitbook serve

Example

  • Official documentation configuration file

https://github.com/snowdreams1006/gitbook-plugin-multilingual-index/blob/master/docs/book.json

{
    "plugins": ["multilingual-index"],
    "pluginsConfig": {
        "multilingual-index": {
            "enableSuper": false,
            "index":"index.html"
        }
    }
}

multilingual-index-use-preview.png

  • Official example configuration file

https://github.com/snowdreams1006/gitbook-plugin-multilingual-index/blob/master/example/book.json

{
    "plugins": ["multilingual-index"],
    "pluginsConfig": {
        "multilingual-index": {
            "enableSuper": true,
            "index":"index.html"
        }
    }
}

multilingual-index-example-preview.png

Sample book.json file with inheriting the default home page

{
   "plugins": ["multilingual-index"],
    "pluginsConfig": {
        "multilingual-index": {
            "enableSuper": true,
            "index":"index.html"
        }
    }
}

Sample book.json file without inheriting the default home page

{
    "plugins": ["multilingual-index"],
    "pluginsConfig": {
        "multilingual-index": {
            "enableSuper": false,
            "index":"index.html"
        }
    }
}

Author

👤 snowdreams1006

Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a Star if this project helped you!

Copyright © 2019 snowdreams1006.

This project is MIT licensed.

Keywords

FAQs

Last updated on 11 Dec 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc