page: record author metadata on creation
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 7 Jun 2020 05:26:53 +0000 (07:26 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 5 Dec 2020 00:41:21 +0000 (01:41 +0100)
Alter initial template html to include a link to the current admin,
retained by ckeditor and available in meta for optional crediting of
different sources.

Named according to https://ogp.me/#no_vertical specification, except target
does not contain the required Open Graph profile tags yet.

page.php

index 5aac31fd7e503b2ede328eaf79a29290aff77e09..14b58db8060484ba3fa2f3e022b554da7d32a153 100644 (file)
--- a/page.php
+++ b/page.php
@@ -173,6 +173,7 @@ $Place = [
 if (!isset($Article->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:author'] = '/' . $User->dir;
 }
 
 if (isset($Article->raw)) {