Jump to: Menu

post-commit hook to generate a changelog page for your Jekyll site


Last year I decided to make my blog private, it enables me to have private sections accessible only to those who have the url.
Yet, I missed some of the transparency history provided by public repositories and opted for an in-between solution :

  • for each commit of type feat or fix a line is added on the Changelog page
  • some filepaths can be kept secret by not reporting related commits
  • although Changelog page additions are automated, commiting it is a task left to human operator

All you need is to add a sentinel to an empty Changelog page like so :

1
2
3
4
5
6
---
layout: page
title: Changelog
permalink: /changelog
---
<!-- Edit below -->

And copy this git post-commit hook in your Jekyll repository :

That’s it, you now have a semi-automated Changelog page.