Open msgilligan opened 6 years ago
In my opinion, this is no different than any other custom metadata header. Here is how I do it for my site -
lastupdated
attribute and set it's value to content update date. The original date remains unchanged, and so the page location.Manik Magar v1.0, 2018-02-18 :toc: preamble :toclevels: 2 :jbake-lastupdated: 2018-03-29 :jbake-type: post :jbake-status: published
<#if (post.lastupdated??)>Last Updated - ${post.lastupdated?date("yyyy-MM-dd")?string('MMMM, dd yyyy')}</#if>
Output can be seen on here - https://javastreets.com/blog/run-mule4-in-docker-container.html
Do you mean, documentation should callout possible use of attribute like lastUpdate
?
Nice @manikmagar !
The advantage to being a standard metadata header is that standard templates could use it. 😀
As I was reading this my first thought was could we use the timestamp of the source content file as a standard metadata variable, but I'm not sure if you were using CI to automate if all files would have the same timestamp.
It would be nice if there were a standard, well-documented metadata item, in addition to
post.date
that can be set and displayed when a post/pages content is updated. The post will still be displayed on the existing URL and have the originalpost.date
value, but an "Update YY/MM/DD" field can be added to the template.