Repository navigation
Conversation
Static 1200x630 PNGs in the site's style, used as og:image.
includes/meta.php now emits og:type, og:title, og:description, og:url, og:image with its type, size and alt text, twitter:card, twitter:site and theme-color. Views override the defaults through $og: the playground and snippet pages get their own image and copy, and articles move their existing tags over to it. The old psalm_preview.png is no longer used.
| $meta_description = $description; | ||
| $timestamp = strtotime($article->date); | ||
| $published = $timestamp === false ? null : date('c', $timestamp); | ||
| $og = [ |
| $published = $timestamp === false ? null : date('c', $timestamp); | ||
| $og = [ | ||
| 'type' => 'article', | ||
| 'title' => $article->title, |
| // /play (?page=play from .htaccess): nav plus the playground filling the viewport, nothing else | ||
| $playground_page = ($_GET['page'] ?? null) === 'play'; | ||
| $canonical_url = $playground_page ? 'https://psalm.dev/play' : 'https://psalm.dev/'; | ||
| $og = $playground_page ? [ |
| header('X-Robots-Tag: noindex, follow'); | ||
| $canonical_url = false; | ||
| // Same preview for every snippet: it never shows the submitted code | ||
| $og = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
og:site_nameand an old screenshot asog:image, so Slack, Discord, X and others showed a bare title or a cropped imageincludes/meta.phpnow emits the full Open Graph and Twitter card set (type, title, description, url, image with size, type and alt text,summary_large_image,@psalmphp) plustheme-color; views override the defaults through$ogassets/og/for the homepage,/play, and snippet pages (/r/<hash>). The snippet image and copy are the same for every snippet for now<title>and the meta description$ogso nothing is emitted twicepsalm_preview.pngis no longer referenced, so it is removed