내 커뮤니티 업적 표시줄을 확대합니다.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Canonical URL and hreflang tag automation

Avatar

Adobe Champion

What's the most efficient way, if it exists, to dynamically add (or automate) the canonical and HREFlang tags to pages, without manually adding  <link rel=”canonical” /> onto head section of each page component? I've seen a possible solution (no JDK 11) in this library: https://github.com/otarsko/aem-seo-canonical-url

And third party tools for XML sitemaps like: https://www.stateofdigital.com/hreflang-sitemap-tool/ 

 

Any other options available? Thanks for any feedback!

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor
3 답변 개

Avatar

Community Advisor

Hi,

Checkout https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/wcm/api/va... for adding hreflang tags

 

Ex: 

List<PageVariant> pageVariants = pageVariantProvider.getVariants(currentPage, slingRequest); 

Avatar

Adobe Champion

Thank you, @Ravi_Pampana we'll  have to check this method out as well as the SAX transformer pipeline suggested by @arunpatidar. Appreciate your feedback!

Avatar

정확한 답변 작성자:
Community Advisor