{permalink} fix (see Discord reference)

From a post on Discord, the current {permalink} tag does not output what is expected: {canonical-domain} + {location} and it should. Adding this here so it doesn’t get lost.

Reference: Discord

Currently using:
<link rel="canonical" href="{canonical-domain}{location}">

Would like to use:
<link rel="canonical" href="{permalink}">

1 Like

From initial testing, this appears to be fixed now.

Removed <link rel="canonical" href="https://custom.themes.lol{location}"> and replaced with <link rel="canonical" href="{permalink}"> and output as expected:

2024-01-03 at 1.17 PM

Marking as resolved.

1 Like

I am just noting that a nice-to-have would be the ability to override the permalink for a post or page via the front matter, so that you could do:

...
Permalink: https://example.com
...

if you wanted to. I tested this and it did not seem to work, not a priority to me, as there are obviously other things to do. Still leaving this as resolved as the original bug was fixed.

The use case for this would be like a page that was used for a landing page such as the homepage of your site and the location is something like /home but you don’t want the permalink to be https://example.com/home you just want it to be https://example.com.

2 Likes

I second this: the current behavior messes with my blog’s Skip Navigation button, so instead of just jumping to the main content (which is the list of blog posts), the button has to redirect first to /home (which is my set landing page) before jumping.

1 Like

Will get this in shortly! I have some dedicated “Sunday coding time” and it’s a priority for that later today. :+1:

Will confirm here once it’s in place.

1 Like