content: [changelog]
  # changelog header
  header = """
  # Changelog
  [//]: # "DO NOT EDIT THIS FILE MANUALLY"
  [//]: # "This file is automatically generated using git-cliff"
  [//]: # "See here for more information: https://git-cliff.org"
  All notable changes to this project will be documented in this file.
  
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
  
  """
  
  # template for the changelog body
  # https://keats.github.io/tera/docs/#introduction
  body = """
  {% macro print_commit(commit) -%}
  - {% if commit.body %}<details>
  {% raw %}  {% endraw %}<summary>{% endif %}\
    {% if commit.scope %}<em>({{ commit.scope }})</em> {% endif %}\
      {{ commit.message }} \
      (\
      <a href="<REPO>/commits/{{ commit.id }}">{{ commit.id | truncate(length=7, end='') }}</a>\
      {%- for issue in commit.footers | filter(attribute='separator', value=' #') -%}
          , <a href="<REPO>/issues/{{ issue.value }}">#{{ issue.value }}</a>\
      {%- endfor -%}
      )\
  
  {%- if commit.body -%}
      {%- set body = commit.body | indent(prefix='  ', blank=true) -%}
      {%- if '```' not in commit.body -%}
          {% set body = body | replace(from='\n', to='<br>\n') -%}
      {%- endif -%}
      </summary>
      {% raw %}  {% endraw %}<blockquote>
  
      {% raw %}  {% endraw %}{{ body }}
      {% raw %}  {% endraw %}</blockquote>
      {% raw %}  {% endraw %}</details>
  {%- endif -%}
  
  {%- if commit.breaking -%}
      {% raw %}  {% endraw %}- **BREAKING**: {{commit.breaking_description}}
  {%- endif -%}
  {% endmacro print_commit -%}
  
  {% set issues = [] %}
  {%- for commit in commits -%}
      {%- for issue in commit.footers | filter(attribute='separator', value=' #') -%}
          {% set_global issues = issues | concat(with = '[#'~issue.value~'](<REPO>/issues/'~issue.value~')') %}
      {%- endfor -%}
  {%- endfor -%}
  
      ## [{{ version | default(value='Unreleased') | trim_start_matches(pat='v') }}] - {{ timestamp | date(format='%Y-%m-%d') }}
  {% if message %}
  {{ message }}
  {% endif %}
  {% if issues | length > 0 %}Issues: {{ issues | sort | unique | join(sep=', ') }}{% raw %}\n {% endraw%}{% endif %}
  {%- for group, commits in commits | group_by(attribute='group') %}
      ### {{ group }}
      {% for commit in commits
      | filter(attribute='scope')
      | sort(attribute='scope') %}
          {{ self::print_commit(commit=commit) }}
      {%- endfor -%}
      {% raw %}\n{% endraw %}\
      {% for commit in commits %}
          {%- if commit.scope -%}{% continue %}{%- endif -%}
          {{ self::print_commit(commit=commit) }}
      {% endfor -%}
  {% endfor %}\n\n
  """
  
  # remove the leading and trailing whitespace from the template
  trim = true
  
  postprocessors = [
    { pattern = '<REPO>', replace = 'https://github.com/muja/unrar.rs' },
  ]
  
  [git]
  # parse the commits based on https://www.conventionalcommits.org
  conventional_commits = true
  # filter out the commits that are not conventional
  filter_unconventional = true
  filter_commits = true
  
  commit_parsers = [
    { message = "^fix", group = "<!--1-->Bug Fixes" },
    { message = "^feat", group = "<!--2-->Features" },
    { message = "^perf", group = "<!--3-->Performance" },
    { message = "^test", group = "<!--5-->Testing" },
    { message = "^doc", group = "<!--6-->Documentation" },
    { message = ".*example", group = "<!--7-->Example" },
    { message = "^style", group = "<!--8-->Styling" },
    { message = "^chore\\(release\\): prepare for", skip = true },
    { message = "^chore\\(pr\\)", skip = true },
    { message = "^chore\\(pull\\)", skip = true },
    { message = "^.*\\bv[0-9]+\\.", skip = true },
    { message = "^chore|^ci|^refactor", group = "<!--4-->Miscellaneous / Refactors" },
    { body = ".*security", group = "<!--2-->Security" },
    { message = "^revert", group = "<!--9-->Revert" },
  ]
  
  