gitbook-plugin-changelog

1.0.1 • Public • Published

Change-log Gitbook Plugin

A plugin for Gitbook that generates a change-log page based on git history.

How to use it

  1. Configure the plugin in your book.json:
{
    "plugins": ["changelog"]
}
  1. Create a new page for your change-log. The contents of this page should look something like this:
{% changelog %}
    {% date %}
    {% message %}
    {% files %}
        {% badge %}
        {% filename link=true %}
        {% changes truncate=true %}
    {% endfiles %}
{% endchangelog %} 
  1. Update your SUMMARY.md to add a link to the change-log page.
### Changelog

* [Change Log](changelog.md)

Options

This plugin takes the following options:

  • diffFilter : (string) filters the inclusion files based their status. See the diff-filter argument of the git diff command for options.
  • dateFormat : (string) formats the output of dates. See momentjs formatting for formatting options.
  • ignore
    • files : (array) an array of file names to ignore (e.g ["package.json",...])
    • exts : (array) an array of file extensions to ignore (e.g ["png","jpg"])
    • firstCommit : (boolean) ignore the very first commit in the history
    • commits : (array) an array of commit hashes to ignore (e.g ["1e3f1b8",...])

Default Options

The default options are documented in defaultOptions.js.

Customizing Options

To customize the options for your project update your book.json:

"pluginsConfig": {
    "changelog" : {
        // your custom options here
    },
}

Readme

Keywords

none

Package Sidebar

Install

npm i gitbook-plugin-changelog

Weekly Downloads

15

Version

1.0.1

License

Apache 2

Unpacked Size

26 kB

Total Files

9

Last publish

Collaborators

  • azeven