uswds-site icon indicating copy to clipboard operation
uswds-site copied to clipboard

UWDS Site: Meta Tags - Use Jekyll SEO gem

Open mahoneycm opened this issue 2 years ago • 1 comments

Description

Uses Jekyll SEO gem. Closes #859.

This gem allows you to add metadata to _config.yml to be automatically formatted into the head of the HTML.

Meta tags before: image

Meta tags w/ Jekyll SEO: image

Additional information

I've seen examples such as #859 and this blog post where we can make improvements such as switching the twitter card from summary to summary_large_image to switch USWDS links on twitter from small cards:

image

To large ones: image

Before you hit Submit, make sure you’ve done whichever of these applies to you:

  • [x] Follow the 18F Front End Coding Style Guide and Accessibility Guide.
  • [x] Run npm test and make sure the tests for the files you have changed have passed.
  • [x] Run your code through HTML_CodeSniffer and make sure it’s error free.
  • [x] Title your pull request using this format: [Website] - [UI component]: Brief statement describing what this pull request solves.

mahoneycm avatar May 10 '22 18:05 mahoneycm

@mejiaj yeah sorry I had to leave the tests in the federalist build so I could generate a preview when pasting the link into Slack!

One example of overwriting the defaults per page is being able to update things like the image, twitter card size or description:

image image

mahoneycm avatar Jun 09 '22 20:06 mahoneycm