0.6.0 • Published 6 years ago

gitbook-plugin-toolbar v0.6.0

Weekly downloads
193
License
Apache-2.0
Repository
github
Last release
6 years ago

plugin-toolbar

This plugin adds buttons with external links to a Gitbook website toolbar.

Configuration

The buttons can be configured in book.json:

{
    "plugins": [
        "toolbar"
    ],
    "pluginsConfig": {
        "toolbar": {
            "buttons":
            [
                {
                    "label": "GitHub",
                    "icon": "fa fa-github",
                    "url": "https://github.com/",
                    "target": "_self"
                },
                {
                    "label": "Search page title on StackOverflow",
                    "icon": "fa fa-stack-overflow",
                    "url": "http://stackoverflow.com/search?q={{title}}"
                },
                {
                    "label": "Share link on Facebook",
                    "icon": "fa fa-facebook",
                    "url": "http://www.facebook.com/sharer/sharer.php?s=100&p[url]={{url}}"
                },
                {
                    "label": "Share page title and link on Twitter",
                    "icon": "fa fa-twitter",
                    "position":"left",
                    "url": "http://twitter.com/home?status={{title}}%20{{url}}"
                },
                {
                    "label": "Edit page on github",
                    "icon": "fa fa-pencil-square-o",
                    "position" : "left",
                    "url": "https://github.com/org/repo/edit/master/{{filepath_lang}}"
                }
                
            ]
        }
    }
}

Button parameters

The table below lists the default values of the optional button parameters:

ButtonDefault
LabelLink
Iconfa-external-link
Positionright

Format strings

The following format strings can be used in your urls:

StringDescription
{{title}}Title of page
{{url}}URL of current page
{{filepath_lang}}Filepath of the source page. This includes the language code in a multilingual book.
0.6.0

6 years ago

0.5.5

8 years ago

0.5.4

8 years ago

0.5.3

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago