1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

OG meta tags by default (#1027)

Fix #981
This commit is contained in:
Sergey Panteleev
2024-07-06 16:04:44 +03:00
committed by GitHub
parent d4acbf45ba
commit 4cf1d83d32
2 changed files with 22 additions and 23 deletions

View File

@@ -118,10 +118,6 @@ $intro .= <<<EOF
</div>
EOF;
// Write out common header
$meta_image_path = $MYSITE . 'images/meta-image.png';
$meta_description = "PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.";
site_header("Hypertext Preprocessor",
[
'current' => 'home',
@@ -149,25 +145,6 @@ site_header("Hypertext Preprocessor",
],
'css' => ['home.css'],
'intro' => $intro,
'meta_tags' => <<<META
<meta name="Description" content="{$meta_description}" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@official_php" />
<meta name="twitter:title" content="PHP: Hypertext Preprocessor" />
<meta name="twitter:description" content="{$meta_description}" />
<meta name="twitter:creator" content="@official_php" />
<meta name="twitter:image:src" content="{$meta_image_path}" />
<meta itemprop="name" content="PHP: Hypertext Preprocessor" />
<meta itemprop="description" content="$meta_description" />
<meta itemprop="image" content="{$meta_image_path}" />
<meta property="og:image" content="{$meta_image_path}" />
<meta property="og:description" content="$meta_description" />
<link href="https://fosstodon.org/@php" rel="me" />
META
],
);