From 063591ce4b064ed149aad58f0c619895c9ae4014 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 2 Dec 2020 23:46:30 +0100 Subject: [PATCH] page: record creation time in template meta tag Another https://ogp.me/#no_vertical object for availability start. May be distinct from chosen (eg historic) dates shown for news articles. Values may be reconstructed for existing files from Git history: perl -i -pE ' close ARGV if eof; # reset line number $. == 1 or next; # ignore consecutive lines my $first = qx{git log --follow --pretty=%ai -- "$ARGV" | tail -n1} or next; # find earliest commit time chomp $first; print qq{}; say "" unless /^raw) and $User->admin("edit {$Article->link}")) { # open template as initial contents $Article->raw(file_exists("$Page/template.inc.html") ? "$Page/template.inc.html" : 'template.inc.html'); + $Article->meta['article:published_time'] = date('Y-m-d h:i:s O'); $Article->meta['article:author'] = '/' . $User->dir; } -- 2.30.0