aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--locale/en_GB.json1
-rw-r--r--templates/pages/page.php9
2 files changed, 9 insertions, 1 deletions
diff --git a/locale/en_GB.json b/locale/en_GB.json
index 094ac2e..f430064 100644
--- a/locale/en_GB.json
+++ b/locale/en_GB.json
@@ -55,6 +55,7 @@
"note.privacy.scope.public": "Public",
"note.resharedBy": "Reshared by %s",
"note.page.author": "By %s",
+ "note.page.description": "A page by %s",
"note.page.created": "First published %s",
"note.page.modified": "Last updated %s",
"note.page.list.pageTitle": "Pages",
diff --git a/templates/pages/page.php b/templates/pages/page.php
index bc17664..dfc171f 100644
--- a/templates/pages/page.php
+++ b/templates/pages/page.php
@@ -8,7 +8,14 @@ use Digitigrade\UserSettings;
$page = $note->getPage();
-call_template('skeleton', ['pageTitle' => $page->title, 'renderTitleHeading' => false], function () use ($note, $page) { ?>
+call_template('skeleton', [
+ 'pageTitle' => $page->title,
+ 'renderTitleHeading' => false,
+ 'ogDesc' => __f('note.page.description', $note->author->displayName),
+ 'ogImage' => $note->author->avatar ?? path_to_uri('/static/default-avatar.png'),
+ 'ogType' => 'article',
+ 'ogHandle' => '@' . $note->author->getFullHandle(true)
+], function () use ($note, $page) { ?>
<div class="notePage">
<article lang="<?= htmlspecialchars($note->language) ?>">
<h1><?= htmlspecialchars($page->title) ?></h1>