gitbook-plugin-fileinfo

1.0.0 • Public • Published

Access file information in Gitbook

Build Status

Built from https://github.com/abhishekdev/gitbook-plugin-packageinfo

Access project file (xml or json) info into the gitbook config object.

You can use it by first adding it to your plugins:

{
    "plugins": ["fileinfo"]
}

then run gitbook install.

Usage

Configure it in the pluginsConfig section by adding file location definitions where name is the tag used in the config to locate the file and path the location of the file (relative to the book contents directory):

    "pluginsConfig": {
        "fileinfo": {
          "files": [
            {"name":"pom", "path":"pom.xml"},
            {"name":"json", "path":"package.json"}
          ]
    },

The file contents are available inside the config, as config.fileinfo.[filename].[fieldpath]

For example {{ config.fileinfo.pom.project.version }} with the plugin configuration above will be replaced by the pom.xml version tag value.

/gitbook-plugin-fileinfo/

    Package Sidebar

    Install

    npm i gitbook-plugin-fileinfo

    Weekly Downloads

    1

    Version

    1.0.0

    License

    Apache-2.0

    Last publish

    Collaborators

    • vboulaye