bmpickford / hreflang-checker

Programatically check hreflangs at a given url using existing js test tooling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hreflang-checker

Easily check your HTML hreflangs are valid in your end to end or integration suite. This package validates

  • Language codes are valid
  • All alternate pages have a 200 response
  • Hreflangs are biderectional
  • Hreflangs are self referencial
  • An x-default tag is present

For more information on hreflangs, see https://developers.google.com/search/docs/specialty/international/localized-versions#all-method-guidelines

Libraries

Testing library Link
Jest link
Mocha link
Playwright link
Cypress (WIP) link

About

Programatically check hreflangs at a given url using existing js test tooling

License:MIT License


Languages

Language:HTML 39.6%Language:JavaScript 39.0%Language:TypeScript 20.2%Language:Shell 1.2%