add og:title
authorMichael Wallner <mike@php.net>
Sat, 12 Feb 2022 13:17:59 +0000 (14:17 +0100)
committerMichael Wallner <mike@php.net>
Sat, 12 Feb 2022 13:17:59 +0000 (14:17 +0100)
views/layout.phtml

index 21693f6dfce8a327e9aa2a348d39be6c41e9ec37..7d7adc6190059e3de01184671a3337ff965e5a76 100644 (file)
                        <?php endif; ?>
                        mdref
                </title>
+               <meta property="og:title" content="<?= $esc(
+                       !empty($title)
+                       ? $title
+                       : (
+                               isset($entry)
+                               ? (
+                                       $entry->isFunction() || $entry->isNsClass()
+                                       ? $entry->getNsName()
+                                       : $entry->getName()
+                               )
+                               : "mdref"
+                       )
+               ) ?>">
                <meta name="viewport" content="width=1200, initial-scale=0.5">
                <?php if (isset($baseUrl)) : ?>
                        <base href="<?= $baseUrl ?>">