diff --git a/README.md b/README.md index 1476767..a93af19 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,17 @@ relative to the `static` folder of your Hugo site: All custom JS files will be added before closing body tag of a `baseof.html` file. +#### Enable User Canonical + +You can specify an explicit canonical link which helps to set a single source +of truth for your page. See [here](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls#rel-canonical-link-method) +how this helps Google to crawl your page. + +```toml +[Params] + enableUserCanonical = true +``` + #### Entry Meta Entry metadata are relevant information about your entry such as published date, last modified date, category, etc. You diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a1eec1a..a45d534 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -21,6 +21,7 @@ {{- $cssMain := resources.Get "css/main.css" }} {{- $cssPrint := resources.Get "css/print.css" }} {{- $style := slice $cssReboot $cssMain $cssPrint | resources.Concat "css/bundle.css" }} + {{if site.Params.enableUserCanonical}}{{end}} {{- range .Site.Params.customCSS }}