Welcome to gitbook-plugin-multilingual-index 👋
customize multilingual home pages
English | 中文
Screenshot
Usage
Step #1 - Update book.json
file
- In you gitbook's
book.json
file, add multilingual-index
to plugins
list. - 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
- 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
- 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"
}
}
}
- 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"
}
}
}
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
Copyright © 2019 snowdreams1006.
This project is MIT licensed.