From 848d8a587efd5f611a98b647b954c06938fac24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sat, 29 Jan 2022 18:53:26 +0300 Subject: [PATCH] docs(config): add minimal example --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++ examples/minimal.toml | 18 +++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 examples/minimal.toml diff --git a/README.md b/README.md index 6542bd15..5ecea742 100644 --- a/README.md +++ b/README.md @@ -746,6 +746,66 @@ All notable changes to this project will be documented in this file. +#### [Minimal](./examples/minimal.toml) + +
+ Raw Output + +``` +## [unreleased] +### Feat +- Support multiple file formats +- Use cache while fetching pages + +## [1.0.1] - 2021-07-18 +### Chore +- Add release script + +### Refactor +- Expose string functions + +## [1.0.0] - 2021-07-18 +### Docs +- Add README.md +- [**breaking**] Add tested usage example + +### Feat +- Add ability to parse arrays + +### Fix +- Rename help argument due to conflict +``` + +
+ +
+ Rendered Output + +## [unreleased] +### Feat +- Support multiple file formats +- Use cache while fetching pages + +## [1.0.1] - 2021-07-18 +### Chore +- Add release script + +### Refactor +- Expose string functions + +## [1.0.0] - 2021-07-18 +### Docs +- Add README.md +- [**breaking**] Add tested usage example + +### Feat +- Add ability to parse arrays + +### Fix +- Rename help argument due to conflict + +
+ #### [Detailed](./examples/detailed.toml)
diff --git a/examples/minimal.toml b/examples/minimal.toml new file mode 100644 index 00000000..58416c8d --- /dev/null +++ b/examples/minimal.toml @@ -0,0 +1,18 @@ +# configuration file for git-cliff (0.1.0) + +[changelog] +# template for the changelog body +# https://tera.netlify.app/docs/#introduction +body = """ +{% if version %}\ + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}\ +{% else %}\ + ## [unreleased]\ +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | upper_first }} + {% for commit in commits %}\ + - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} + {% endfor %}\ +{% endfor %}\n +"""