-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow page-relative alias in front matter #5757
Comments
I have a feeling that that won't be very intuitive. Seeing 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. |
Yea, ok, that's fair. I have probably done the same. I will ... think about it. |
@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:
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is related to #5704 -- but I suspect even more common a problem. I discovered this while testing the new
--path-warnings
(coming in Hugo 0.55) on some sites.This is from Let's encrypt's website, a French translation of one of the pages:
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
/certs
will point to the server root, so it will be a little random which language will get the redirect.We cannot change the meaning of
/certs
in the example above, but I suggest we do as in #5704 and say that alias definitions not starting with a leading/
is considered relative to the language root where they belong, e.g.:/cc @regisphilibert @kaushalmodi @budparr
The text was updated successfully, but these errors were encountered: