md-pdf 0.1.2

Convert markdown files to PDF using typst with templating
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration

[changelog]
# template for the changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
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 | striptags | trim | upper_first }}
    {% for commit in commits %}
        - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
            {% if commit.breaking %}[**breaking**] {% endif %}\
            {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }}) - {{ commit.author.name }})\
    {% endfor %}
{% endfor %}\n
{% if version %}\
    {% if previous.version %}\
      **Full Changelog**: [{{ previous.version }}...{{ version }}]($REPO/compare/{{ previous.version }}...{{ version }})
    {% endif %}
{% else -%}
  {% raw %}\n{% endraw %}
{% endif %}
"""
# template for the changelog footer
footer = """
"""
# remove the leading and trailing s
trim = true
# postprocessors
postprocessors = [
  { pattern = '\$REPO', replace = "https://github.com/tschinz/md-pdf" }, # replace repository URL
]
# render body even when there are no releases to process
# render_always = true
# output file path (done in CLI see just file)
# output = "CHANGELOG.md"

[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = false
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
  # Replace issue numbers
  #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
  # Check spelling of the commit with https://github.com/crate-ci/typos
  # If the spelling is incorrect, it will be automatically fixed.
  #{ pattern = '.*', replace_command = 'typos --write-changes -' },
]
# regex for parsing and grouping commits
# # regex for parsing and grouping commits
commit_parsers = [
  { message = "^feat(ure)?s?", group = "<!-- 0 -->๐Ÿš€ Features" },
  { message = "^fix(es)?", group = "<!-- 1 -->๐Ÿ› Bug Fixes" },
  { message = "^docs?", group = "<!-- 3 -->๐Ÿ“š Documentation" },
  { message = "^perf(ormance)?s?", group = "<!-- 4 -->โšก Performance" },
  { message = "^refactors?", group = "<!-- 2 -->๐Ÿšœ Refactoring" },
  { message = "^styles?", group = "<!-- 5 -->๐ŸŽจ Styling" },
  { message = "^tests?", group = "<!-- 6 -->๐Ÿงช Testing" },
  { message = "^chores?", group = "<!-- 7 -->โš™๏ธ Miscellaneous Tasks" },
  { message = "^security", group = "<!-- 8 -->๐Ÿ›ก๏ธ Security" },
  { body = ".*security", group = "<!-- 8 -->๐Ÿ›ก๏ธ Security" },
  { message = "^reverts?", group = "<!-- 9 -->โ—€๏ธ Revert" },

  # Conventional commit exclusions
  { message = "^chores?\\(releases?\\):", skip = true },
  { message = "^chores?\\(deps?.*\\)", skip = true },
  { message = "^chores?\\(pr\\)", skip = true },
  { message = "^chores?\\(pull\\)", skip = true },
  { message = "^chores?\\(version\\):", skip = true },

  # Legacy commit styles
  { message = "(?i)^ADD", group = "<!-- 0 -->๐Ÿš€ Features" },
  { message = "(?i)^CHG", group = "<!-- 0 -->๐Ÿš€ Features" },
  { message = "(?i)^REM", group = "<!-- 2 -->๐Ÿšœ Refactoring" },
  { message = "(?i)^MOV", group = "<!-- 2 -->๐Ÿšœ Refactoring" },
  { message = "(?i)^FIX", group = "<!-- 1 -->๐Ÿ› Bug Fixes" },
  { message = "(?i)^NOTE", group = "<!-- 10 -->๐Ÿ’ผ Other" },
  { message = "(?i)^WARN", group = "<!-- 8 -->๐Ÿ›ก๏ธ Security" },

  { message = ".*", group = "<!-- 10 -->๐Ÿ’ผ Other" },
]

# filter out the commits that are not matched by commit parsers
filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"