Add image meta tags to De-risking Guide pages #713
+98
−15
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.
Changes proposed in this pull request:
og:image
andog:image:alt
meta tags that are configurable per guide. Details are in the updated development doc.og:image
with empty alt text for the de-risking guide.Resolves #705 .
Testing
Testing is manual and indirect, since image URLs are environment-specific and we don't have direct control over whether platforms use our pages'
og:image
metadata.In the PR preview build
og:image
tag with content set to a relative path to an image fileog:image:alt
tag with content set to ""og:image
orog:image:alt
meta tag is present.In a local build environment
NODE_ENV=production npm run dev
og:image
tag is present and has its content set to an absolute image URL, beginning withhttps://guides.18f.gov/
security considerations
No security considerations; these changes use the existing Eleventy framework and OpenGraph standards.
In particular, the mechanism for determining whether the build the site for a production environment is already used to generate sitemap.xml.