{{ $stableVersion := $.Site.Data.versions.stable_version }}
{{ $canonicalURL := print (replaceRE `\/$` "" .Site.BaseURL) (replaceRE "[^/]+.*?[0]" $stableVersion .RelPermalink) }}

<link rel="canonical" href="{{ $canonicalURL }}" />
