From 6f9919bf3e592dcff2317cff1f003febbf41cec0 Mon Sep 17 00:00:00 2001 From: Parth Modi Date: Thu, 25 May 2017 11:11:36 +0530 Subject: [PATCH] Updated Readme with instructions of setting customized Canonical URL --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 06bb529..e44c7aa 100644 --- a/README.md +++ b/README.md @@ -224,3 +224,30 @@ defaults: ### SmartyPants Titles Titles will be processed using [Jekyll's `smartify` filter](https://jekyllrb.com/docs/templates/). This will use SmartyPants to translate plain ASCII punctuation into "smart" typographic punctuation. This will not render or strip any Markdown you may be using in a page title. + +### Setting customized Canonical URL + +You can set custom Canonical URL for a page by specifying canonical_url option in page front-matter. +E.g., you have the following in the page's front matter: +```yml +layout: post +title: Title of Your Post +canonical_url: 'https://github.com/jekyll/jekyll-seo-tag/' +``` + +Which will generate canonical_url with specified link in canonical_url. +```html + +``` + +If no canonical_url option was specified, then uses page url for generating canonical_url. +E.g., you have not specified canonical_url in front-matter: +```yml +layout: post +title: Title of Your Post +``` + +Which will generate following canonical_url: +```html + +```