How to add a canonical URL to Jekyll posts
Add jekyll-seo-tag to your _config.yml file.
plugins:
- jekyll-seo-tagThen in the frontmatter for your posts, add the canonical URL:
---
title: How to add a canonical URL to Jekyll posts
canonical_url: 'https://your-canonical-url-here'
---