Repository navigation
feat(site): add a social preview image and structured data - #198
Merged
Merged
Conversation
Adds a 1200x630 Open Graph image rendered by scripts/og/generate.py from the site's own fonts and colours, and references it from every page with summary_large_image cards. The home page Open Graph title now carries the headline instead of the bare site name, the meta description matches the landing copy, and a small SoftwareApplication JSON-LD block describes the project.
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.
Sharing a link to the site currently shows a text-only card. This adds a 1200x630 social image and the tags that go with it.
scripts/og/generate.pyrenders the image with Pillow from the site's own fonts (fetched from a pinned google/fonts commit into a cache) and colours. Run it again when the headline changes; the output is committed atdocs/static/img/og.png.og:image,twitter:card=summary_large_imageand the matching Twitter tags.Checked with a production build: the tags render on all six pages, the JSON-LD parses, and re-running the generator from a clean font cache reproduces the committed PNG byte for byte.