There is a good practice to maintain a changelog file for a project. One of the most used templates for
CHANGELOG.md is described on keepachangelog.com.
If you’re using IntelliJ IDEA or other JetBrains IDE, you can generate a new CHANGELOG.md using File and Code
Templates feature.

It’s using Apache Velocity templating language. And if you are pasting changelog’s markdown template as is, generated file will be like this:
| |
Apache Velocity ignores 2nd and 3rd level headers. The problem is that strings starting with double hash (##) are used as comments by Velocity templating.
Escaping attempt
Trying to use escaping VTL references
with \ character actually does not help. For example, escaping like this:
| |
will generate the following content for the file:
| |
Solution
For generating correct markdown, you can assign hash sign (#) to a variable and then use it in the
Velocity template.
| |