A plugin for Gitbook that generates a change-log page based on git history.
- Configure the plugin in your
book.json
:
{
"plugins": ["changelog"]
}
- 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 %}
- Update your
SUMMARY.md
to add a link to the change-log page.
### Changelog
* [Change Log](changelog.md)
This plugin takes the following options:
-
diffFilter
: (string) filters the inclusion files based their status. See the diff-filter argument of thegit 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",...]
)
-
The default options are documented in defaultOptions.js.
To customize the options for your project update your book.json
:
"pluginsConfig": {
"changelog" : {
// your custom options here
},
}