diff options
author | Bryan Brattlof <hello@bryanbrattlof.com> | 2021-05-17 09:06:06 -0400 |
---|---|---|
committer | Bryan Brattlof <hello@bryanbrattlof.com> | 2021-05-17 09:06:06 -0400 |
commit | 7d28fa725d292d6b354256e936887ea932b23e2d (patch) | |
tree | c9e01d3ee098b7fe3e60d9c9b9ca0a5a8aeffa51 | |
parent | 57e1cefb653efa73f2f6f9aed75f4da974bddea0 (diff) | |
download | bryanbrattlof.com-7d28fa725d292d6b354256e936887ea932b23e2d.tar.gz bryanbrattlof.com-7d28fa725d292d6b354256e936887ea932b23e2d.tar.bz2 |
Use absolute path for canonical urls
The 'tag.html' template is generating relative paths for each tag page
and causing problems for bots when they explore the website.
Use the SITEURL variable to generate the absolute path for each tag page
and stop the bots from looking for 'https://{SITEURL}/{TAG}/{TAG}'
-rw-r--r-- | templates/tag.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/tag.html b/templates/tag.html index bc10ddf..73c8532 100644 --- a/templates/tag.html +++ b/templates/tag.html @@ -8,7 +8,7 @@ {{ meta.title(tag.name + ' « ' + SITENAME) }} {{ meta.description("Bryan's Essays About " + tag.name|capitalize) }} {{ meta.image(TWITTER_IMAGE, SITENAME) }} -{{ meta.url(TAG_URL.format(slug=tag.slug)) }} +{{ meta.url('/'.join((SITEURL, TAG_URL.format(slug=tag.slug)))) }} {{ meta.og_site_name(SITENAME) }} {{ meta.twitter_card('summary') }} {{ meta.twitter_site(TWITTER_HANDLE) }} |