jekyll / jekyll-seo-tag

A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.
https://jekyll.github.io/jekyll-seo-tag
MIT License
1.66k stars 294 forks source link

Offer an option to automatically chop the .html off of canonical URLs #501

Open hakanai opened 9 months ago

hakanai commented 9 months ago

Leaf pages on my site come out in the metadata as follows:

<link rel="canonical" href="https://mysite.name//external-resources.html" />

I'd prefer to omit the .html from all these. I know I can manually set canonical_url for all my pages, but that would introduce a new problem where if I ever rename a page, I have to manually edit canonical_url to keep it in sync.

I'm not sure that everyone would prefer to remove the .html, though, so I guess it should be a site option.