diff --git a/examples/detailed.toml b/examples/detailed.toml
index 42320af6cd..e3cdf77a83 100644
--- a/examples/detailed.toml
+++ b/examples/detailed.toml
@@ -11,9 +11,9 @@ All notable changes to this project will be documented in this file.\n
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
+ ## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
- ## [unreleased]
+ ## Unreleased
{% endif %}\
{% if previous %}\
{% if previous.commit_id and commit_id %}
@@ -24,7 +24,7 @@ body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- - {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))\
+ - {{ commit.message | split(pat="\n") | first | upper_first | trim }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))\
{% for footer in commit.footers -%}
, {{ footer.token }}{{ footer.separator }}{{ footer.value }}\
{% endfor %}\
@@ -42,9 +42,7 @@ trim = true
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
-filter_unconventional = true
-# process each line of a commit as an individual commit
-split_commits = false
+filter_unconventional = false
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "Features" },
diff --git a/examples/github-keepachangelog.toml b/examples/github-keepachangelog.toml
index af80bfb19a..0c587aad70 100644
--- a/examples/github-keepachangelog.toml
+++ b/examples/github-keepachangelog.toml
@@ -23,15 +23,13 @@ body = """
## [Unreleased]
{% endif -%}
-### Details\
-
{% for group, commits in commits | group_by(attribute="group") %}
- #### {{ group | upper_first }}
+ ### {{ group | upper_first }}
{%- for commit in commits %}
- - {{ commit.message | upper_first | trim }}\
+ - {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
{% if commit.github.username %} by @{{ commit.github.username }}{%- endif -%}
{% if commit.github.pr_number %} in \
- [#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \
+ [#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \
{%- endif -%}
{% endfor %}
{% endfor %}
@@ -72,9 +70,7 @@ trim = true
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
-filter_unconventional = true
-# process each line of a commit as an individual commit
-split_commits = false
+filter_unconventional = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# remove issue numbers from commits
@@ -82,6 +78,9 @@ commit_preprocessors = [
]
# regex for parsing and grouping commits
commit_parsers = [
+ { message = "^[a|A]dd", group = "Added" },
+ { message = "^[s|S]upport", group = "Added" },
+ { message = "^[r|R]emove", group = "Removed" },
{ message = "^.*: add", group = "Added" },
{ message = "^.*: support", group = "Added" },
{ message = "^.*: remove", group = "Removed" },
@@ -92,8 +91,8 @@ commit_parsers = [
{ message = "^.*", group = "Changed" },
]
# filter out the commits that are not matched by commit parsers
-filter_commits = true
+filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
-sort_commits = "oldest"
+sort_commits = "newest"
diff --git a/examples/keepachangelog.toml b/examples/keepachangelog.toml
index adbe4040bb..230819302c 100644
--- a/examples/keepachangelog.toml
+++ b/examples/keepachangelog.toml
@@ -21,7 +21,7 @@ body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- - {{ commit.message | upper_first }}\
+ - {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
{% endfor %}
{% endfor %}\n
"""
@@ -48,23 +48,24 @@ trim = true
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
-filter_unconventional = true
-# process each line of a commit as an individual commit
-split_commits = false
+filter_unconventional = false
# regex for parsing and grouping commits
commit_parsers = [
- { message = "^.*: add", group = "Added" },
- { message = "^.*: support", group = "Added" },
- { message = "^.*: remove", group = "Removed" },
- { message = "^.*: delete", group = "Removed" },
- { message = "^test", group = "Fixed" },
- { message = "^fix", group = "Fixed" },
- { message = "^.*: fix", group = "Fixed" },
- { message = "^.*", group = "Changed" },
+ { message = "^[a|A]dd", group = "Added" },
+ { message = "^[s|S]upport", group = "Added" },
+ { message = "^[r|R]emove", group = "Removed" },
+ { message = "^.*: add", group = "Added" },
+ { message = "^.*: support", group = "Added" },
+ { message = "^.*: remove", group = "Removed" },
+ { message = "^.*: delete", group = "Removed" },
+ { message = "^test", group = "Fixed" },
+ { message = "^fix", group = "Fixed" },
+ { message = "^.*: fix", group = "Fixed" },
+ { message = "^.*", group = "Changed" },
]
# filter out the commits that are not matched by commit parsers
-filter_commits = true
+filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
-sort_commits = "oldest"
+sort_commits = "newest"
diff --git a/examples/minimal.toml b/examples/minimal.toml
index 05c62b9f01..54d8ffcffb 100644
--- a/examples/minimal.toml
+++ b/examples/minimal.toml
@@ -6,9 +6,9 @@
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}\
+ ## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}\
{% else %}\
- ## [unreleased]\
+ ## Unreleased\
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
diff --git a/examples/scoped.toml b/examples/scoped.toml
index d13c086bf5..7c34b50036 100644
--- a/examples/scoped.toml
+++ b/examples/scoped.toml
@@ -11,9 +11,9 @@ All notable changes to this project will be documented in this file.\n
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
+ ## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
- ## [unreleased]
+ ## Unreleased
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
diff --git a/examples/scopesorted.toml b/examples/scopesorted.toml
index 4bb0e02c99..2b8a6b30ae 100644
--- a/examples/scopesorted.toml
+++ b/examples/scopesorted.toml
@@ -11,9 +11,9 @@ All notable changes to this project will be documented in this file.\n
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
+ ## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
- ## [unreleased]
+ ## Unreleased
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
@@ -51,8 +51,6 @@ trim = true
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
-# process each line of a commit as an individual commit
-split_commits = false
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "Features" },
diff --git a/examples/unconventional.toml b/examples/unconventional.toml
index b0990bb5df..f385dc1f2a 100644
--- a/examples/unconventional.toml
+++ b/examples/unconventional.toml
@@ -11,9 +11,9 @@ All notable changes to this project will be documented in this file.\n
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
+ ## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
- ## [unreleased]
+ ## Unreleased
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
diff --git a/typos.toml b/typos.toml
index dce75254eb..a3d6c23251 100644
--- a/typos.toml
+++ b/typos.toml
@@ -1,5 +1,11 @@
+# configuration for https://github.com/crate-ci/typos
+
[type.md]
extend-ignore-re = [
"\\[[[:xdigit:]]{7}\\]\\(https://github.com/orhun/git-cliff/commit/[[:xdigit:]]{40}\\)",
"\\[halp\\]\\(https://github.com/orhun/halp\\)",
+ "upport",
]
+
+[default.extend-words]
+upport = "upport"
diff --git a/website/docs/templating/examples.md b/website/docs/templating/examples.md
index f4094021c8..94cd065614 100644
--- a/website/docs/templating/examples.md
+++ b/website/docs/templating/examples.md
@@ -237,16 +237,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
-- Add README.md
-- Add ability to parse arrays
- Add tested usage example
+- Add ability to parse arrays
+- Add README.md
+
+### Changed
+
+- Initial commit
### Fixed
- Rename help argument due to conflict
-[unreleased]: https://github.com/orhun/git-cliff/compare/v1.0.1..HEAD
-[1.0.1]: https://github.com/orhun/git-cliff/compare/v1.0.0..v1.0.1
+[unreleased]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.1..HEAD
+[1.0.1]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.0..v1.0.1
```
@@ -287,16 +291,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
-- Add README.md
-- Add ability to parse arrays
- Add tested usage example
+- Add ability to parse arrays
+- Add README.md
+
+### Changed
+
+- Initial commit
### Fixed
- Rename help argument due to conflict
-[unreleased]: https://github.com/orhun/git-cliff/compare/v1.0.1..HEAD
-[1.0.1]: https://github.com/orhun/git-cliff/compare/v1.0.0..v1.0.1
+[unreleased]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.1..HEAD
+[1.0.1]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.0..v1.0.1
@@ -371,29 +379,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
-### Details
-#### Added
+
+### Added
- Support multiple file formats by @orhun
-#### Changed
+### Changed
- Use cache while fetching pages by @orhun
## [1.0.1] - 2021-07-18
-### Details
-#### Added
+
+### Added
- Add release script by @orhun
-#### Changed
+### Changed
- Expose string functions by @orhun
## [1.0.0] - 2021-07-18
-### Details
-#### Added
-- Add README.md by @orhun
-- Add ability to parse arrays by @orhun
+
+### Added
- Add tested usage example by @orhun
+- Add ability to parse arrays by @orhun
+- Add README.md by @orhun
-#### Fixed
+### Changed
+- Initial commit by @orhun
+
+### Fixed
- Rename help argument due to conflict by @orhun
[unreleased]: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.1..HEAD
@@ -416,39 +427,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
-### Details
-
-#### Added
+### Added
- Support multiple file formats by @orhun
-#### Changed
+### Changed
- Use cache while fetching pages by @orhun
## [1.0.1] - 2021-07-18
-### Details
-
-#### Added
+### Added
- Add release script by @orhun
-#### Changed
+### Changed
- Expose string functions by @orhun
## [1.0.0] - 2021-07-18
-### Details
-
-#### Added
+### Added
-- Add README.md by @orhun
-- Add ability to parse arrays by @orhun
- Add tested usage example by @orhun
+- Add ability to parse arrays by @orhun
+- Add README.md by @orhun
+
+### Changed
-#### Fixed
+- Initial commit by @orhun
+
+### Fixed
- Rename help argument due to conflict by @orhun
@@ -465,19 +474,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Raw Output
```
-## [unreleased]
+## Unreleased
### Feat
- Support multiple file formats
- Use cache while fetching pages
-## [1.0.1] - 2021-07-18
+## 1.0.1 - 2021-07-18
### Chore
- Add release script
### Refactor
- Expose string functions
-## [1.0.0] - 2021-07-18
+## 1.0.0 - 2021-07-18
### Docs
- Add README.md
- [**breaking**] Add tested usage example
@@ -494,36 +503,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Rendered Output
-## [unreleased]
-
+## Unreleased
### Feat
-
- Support multiple file formats
- Use cache while fetching pages
-## [1.0.1] - 2021-07-18
-
+## 1.0.1 - 2021-07-18
### Chore
-
- Add release script
### Refactor
-
- Expose string functions
-## [1.0.0] - 2021-07-18
-
+## 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
@@ -538,14 +538,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
All notable changes to this project will be documented in this file.
-## [unreleased]
+## Unreleased
### Features
- Support multiple file formats ([a9d4050](a9d4050212a18f6b3bd76e2e41fbb9045d268b80))
- Use cache while fetching pages ([df6aef4](df6aef41292f3ffe5887754232e6ea7831c50ba5))
-## [1.0.1] - 2021-07-18
+## 1.0.1 - 2021-07-18
[ad27b43](ad27b43e8032671afb4809a1a3ecf12f45c60e0e)...[06412ac](06412ac1dd4071006c465dde6597a21d4367a158)
@@ -557,7 +557,7 @@ All notable changes to this project will be documented in this file.
- Expose string functions ([e4fd3cf](e4fd3cf8e2e6f49c0b57f66416e886c37cbb3715))
-## [1.0.0] - 2021-07-18
+## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -584,7 +584,7 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
-## [unreleased]
+## Unreleased
### Features
@@ -632,7 +632,7 @@ ad27b43...06412ac
All notable changes to this project will be documented in this file.
-## [unreleased]
+## Unreleased
### Features
@@ -644,7 +644,7 @@ All notable changes to this project will be documented in this file.
- Support multiple file formats
-## [1.0.1] - 2021-07-18
+## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -658,7 +658,7 @@ All notable changes to this project will be documented in this file.
- Expose string functions
-## [1.0.0] - 2021-07-18
+## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -694,7 +694,7 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
-## [unreleased]
+## Unreleased
### Features
@@ -706,7 +706,7 @@ All notable changes to this project will be documented in this file.
- Support multiple file formats
-## [1.0.1] - 2021-07-18
+## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -720,7 +720,7 @@ All notable changes to this project will be documented in this file.
- Expose string functions
-## [1.0.0] - 2021-07-18
+## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -758,14 +758,14 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
-## [unreleased]
+## Unreleased
### Features
- *(cache)* Use cache while fetching pages
- *(config)* Support multiple file formats
-## [1.0.1] - 2021-07-18
+## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -775,7 +775,7 @@ All notable changes to this project will be documented in this file.
- *(parser)* Expose string functions
-## [1.0.0] - 2021-07-18
+## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -803,38 +803,38 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
-## [unreleased]
+## Unreleased
### Features
-- _(cache)_ Use cache while fetching pages
-- _(config)_ Support multiple file formats
+- *(cache)* Use cache while fetching pages
+- *(config)* Support multiple file formats
-## [1.0.1] - 2021-07-18
+## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
-- _(release)_ Add release script
+- *(release)* Add release script
### Refactor
-- _(parser)_ Expose string functions
+- *(parser)* Expose string functions
-## [1.0.0] - 2021-07-18
+## 1.0.0 - 2021-07-18
### Bug Fixes
-- _(args)_ Rename help argument due to conflict
+- *(args)* Rename help argument due to conflict
### Documentation
-- _(example)_ Add tested usage example
+- *(example)* Add tested usage example
- **BREAKING**: add tested usage example
-- _(project)_ Add README.md
+- *(project)* Add README.md
### Features
-- _(parser)_ Add ability to parse arrays
+- *(parser)* Add ability to parse arrays
@@ -850,14 +850,14 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
-## [unreleased]
+## Unreleased
### Features
- feat(config): support multiple file formats
- feat(cache): use cache while fetching pages
-## [1.0.1] - 2021-07-18
+## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -867,7 +867,7 @@ All notable changes to this project will be documented in this file.
- refactor(parser): expose string functions
-## [1.0.0] - 2021-07-18
+## 1.0.0 - 2021-07-18
### Bug Fixes
@@ -898,14 +898,14 @@ All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
-## [unreleased]
+## Unreleased
### Features
- feat(config): support multiple file formats
- feat(cache): use cache while fetching pages
-## [1.0.1] - 2021-07-18
+## 1.0.1 - 2021-07-18
### Miscellaneous Tasks
@@ -915,7 +915,7 @@ All notable changes to this project will be documented in this file.
- refactor(parser): expose string functions
-## [1.0.0] - 2021-07-18
+## 1.0.0 - 2021-07-18
### Bug Fixes