Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

gitbook-plugin-fileinfo

vboulaye14Apache-2.01.0.0

Gitbook Plugin to read a custom file (json or xml) make its content available to the gitbook

gitbook, plugin, npm

readme

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.