pages-uswds-gatsby icon indicating copy to clipboard operation
pages-uswds-gatsby copied to clipboard

Add Date Metadata (via Sitemap and OpenGraph Tags)

Open amanifarooque opened this issue 2 years ago • 0 comments

This is a continuation of the work done in https://github.com/18F/federalist-uswds-gatsby/pull/467.

1. Add to the sitemap With that PR, we added the gatsby-plugin-sitemap to the template. However, the standard implementation does not include the date, which both Search.gov and other search engines use to discover content changes.

The plugin documentation lists an example of how to implement (https://www.gatsbyjs.com/plugins/gatsby-plugin-sitemap/#example) but I haven't figured out how to do so in the context of this template.

Our request is that the in the sitemap reflects the date field in each page's frontmatter.

2. Add article:published_time Open Graph tag to SEO component Here is the start for the suggested changes: https://github.com/amanifarooque/federalist-uswds-gatsby/commit/27622f8711e812d440b5412c621615b5e1e61cbd

The OpenGraph article:published_time field can be used to boost relevancy for newly published or newly updated articles. At the least, we would love to have this added across all blog type posts, but a last_updated field on any webpage would also be useful for the Search.gov ranking algorithm.

Note that the sample changes above do not have it formatted properly in ISO format; I wasn't sure how to update that, so leaning on your expertise there!

amanifarooque avatar Apr 07 '22 19:04 amanifarooque