Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow page-relative alias in front matter #5757
This is related to #5704 -- but I suspect even more common a problem. I discovered this while testing the new
This is from Let's encrypt's website, a French translation of one of the pages:
--- title: Chaîne de confiance slug: certificates top_graphic: 5 aliases: [/certs] ---
It's easy to see what has happened here: They have copied the English original and translated the language strings.
The problem is, however, that
We cannot change the meaning of
--- title: Chaîne de confiance slug: certificates top_graphic: 5 aliases: [certs] ---
I have a feeling that that won't be very intuitive.
Is there a possibility to use special variables like
How is that more intuitive? And would a page alias in the same folder be a common enough use case to even be considered? I did not make that connection with the above. Also, keep in mind that a solution to this would have to be simple (also to implement) to get in the next release -- I need to either fix this or remove/hide the new duplicate path warning thing.
I can't speak for everyone. But I have uses page aliases many times. It's usually when I have published a post, and then later rename it to something better.
A very common general purpose application is to have shorturl aliases for each post (which I auto generate and insert to front-matter).
One can argue that you can use the redirects too. But having aliases for a page in that page's front matter is useful too.
Just my few cents.
@kaushalmodi I have thought about this, and I think you are right. Pate-relative aliases would solve the above problem and also be more flexible. Some alias variants would be: