aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/thread_page.php
diff options
context:
space:
mode:
authorwinter2025-01-26 17:23:11 +0000
committerwinter2025-01-26 17:23:11 +0000
commitdf5ead7bd4adac405811b91fed1e5f0b3775206b (patch)
tree20402ccab2fba3af35a83bd034f13876aabd4f5b /templates/thread_page.php
parente8106abb8006f5e60e1f2d42621c64ae3d78e372 (diff)
add link preview metadata
Diffstat (limited to 'templates/thread_page.php')
-rw-r--r--templates/thread_page.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/thread_page.php b/templates/thread_page.php
index 119f879..b46c968 100644
--- a/templates/thread_page.php
+++ b/templates/thread_page.php
@@ -4,7 +4,12 @@ use Digitigrade\Model\UserAccount;
call_template('skeleton', [
'pageTitle' => '"' . $note->plainContent . '" - @' . $note->author->getFullHandle(),
- 'renderTitleHeading' => false
+ 'renderTitleHeading' => false,
+ 'ogTitle' => $note->author->displayName,
+ 'ogDesc' => $note->plainContent,
+ 'ogImage' => $note->author->avatar ?? path_to_uri('/static/default-avatar.png'),
+ 'ogType' => 'article',
+ 'ogHandle' => '@' . $note->author->getFullHandle(true)
], function () {
global $note;
$notes = Note::findAllInThread($note->threadApex ?? $note);