npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

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.

install

npm i gitbook-plugin-fileinfo

Downloadsweekly downloads

6

version

1.0.0

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability