Keeping the old names for backwards compatibility.
I've also changed the hook to pre_render since post_init was resulting in current date/time rather than post's date time. Suspecting the post_init hook executes before the front matter is actually processed.
Jekyll's hook container names changed almost 5 years ago! https://github.com/jekyll/jekyll/commit/b89f943bf22bd7f36c8378791ca543e16a59f442
Keeping the old names for backwards compatibility.
I've also changed the hook to
pre_render
sincepost_init
was resulting in current date/time rather than post's date time. Suspecting thepost_init
hook executes before the front matter is actually processed.