Added Support for Canonical page link in <head>#2032
Added Support for Canonical page link in <head>#2032iArchitSharma wants to merge 1 commit intogoogle:mainfrom
Conversation
Signed-off-by: Archit Sharma <74408634+iArchitSharma@users.noreply.github.com>
|
Hi, thanks for the PR! |
|
Hi @iArchitSharma - it looks like you copied the file that I put together for the OTel.io site. Is that the case? If so, then that file is a partial experimental design (I still have work to do on it), and it isn't suitable, in it's current form, for inclusion in Docsy yet. |
|
@fekete-robert, thanks for the info. I'll move this functionality to head directly then. |
|
Yes, @chalin, I copied this from the OTel.io site. Although when I tested it, it seemed to work as intended. What improvements are needed here? I would love to help |
This PR fixes #2010 #1537
this code generates a canonical link tag for a webpage based on the value of the
canonical_urlparameter in the content file's front matter. If the parameter is not defined, it falls back to the permalink of the page, ensuring that search engines understand the preferred URL for the page.