1.0.1 • Published 6 years ago

gitbook-plugin-changelog v1.0.1

Weekly downloads
39
License
Apache 2
Repository
github
Last release
6 years ago

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"]
}

2) 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 %} 

3) 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
    },
}