using the same logic in the sitemap (or backstop.ts test), for each page, load the page, parse it as Hast and check if a <link rel=“canonical” href=“https://example.com/sample-page/” /> exists.
add canonical to all pages, but not for:
404
redirects
RSS feeds
Please note that the tool should work against a working website such as http://localhost:4000 or https://learnk8s.io
We should add canonical tags to all the pages.
Tasks:
backstop.ts
test), for each page, load the page, parse it as Hast and check if a<link rel=“canonical” href=“https://example.com/sample-page/” />
exists.Please note that the tool should work against a working website such as
http://localhost:4000
orhttps://learnk8s.io