Repository navigation
Add description and link preview metadata to every page - #196
Closed
bendichter wants to merge 2 commits into
Closed
bendichter wants to merge 2 commits into
bendichter wants to merge 2 commits into
Conversation
Pages had no meta description and no Open Graph tags, so links shared in Slack, Bluesky or LinkedIn showed no title, summary or image, and search engines had to pick their own snippet. The new partial takes the description from the `description`, `summary` or `subtitle` front matter, then the start of the page body, then a site-wide default in hugo.yaml. The preview image is the page's `image` when it is a PNG or JPEG no wider than 3.3:1, and a default card otherwise. The default card is the Zoom background from the branding page cropped to 1200x630. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for nwborg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The site already has config/_default/params.yaml for the logo and the header button. The two new parameters belong there, not in a second `params` block in hugo.yaml. The built site is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded by #208, which combines this with the related PRs. The commits here are included there unchanged. |
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.
Pages have no meta description and no Open Graph tags. A link to nwb.org pasted into Slack, Bluesky or LinkedIn shows a bare URL with no title, summary or image, and search engines choose their own snippet.
This adds a partial that writes a meta description, the Open Graph tags and a Twitter card type on every page. The description comes from the page's
description,summary(events) orsubtitle(news) front matter. A page with none of those uses the start of its body, and a page with no body uses a site-wide default set inconfig/_default/params.yaml.The preview image is the page's
imagewhen it is a PNG or JPEG no wider than 3.3:1, which covers the news banners, most event banners and the tool logos. Previews crop to about 1.9:1, so a wide logo strip such as the default event banner would lose most of its width. Those pages, and pages with a GIF or no image, use a default card, which is the Zoom background from the branding page cropped to 1200x630.Of the 155 pages, 63 use their own image and 92 use the default card. 30 pages fall through to the site-wide description. The output is identical under Hugo 0.128.0 and 0.152.2.
🤖 Generated with Claude Code