Closed Simon-Tang closed 6 years ago
Right now, the redirect page is logically a distinct page from the page that declares it, meaning we set the redirect metadata, but don't carry over the declaring page's metadata. It wouldn't be difficult to implement (not sure if it makes sense), but that's not currently implemented. Can you talk a bit more about what you're trying to do?
I understand and agree with your point on the redirect page being separate from the page that it redirects to - however what I'm curious about is declaring a page variable in the redirect.html
that can be accessed in the layout that it uses.
In my example, I define a variable in the front matter of the redirect.html
file and tell it to use the layout base_layout
. The behaviour I expected is that base_layout
would be able to access the variable defined in the front matter of redirect.html
.
This issue has been automatically marked as stale because it has not been commented on for at least two months.
The resources of the Jekyll team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.
This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.
I have a
_layouts/redirect.html
like this:In
base_layout.html
I can access{{ page.redirect.to }}
as expected, but cannot access any other variables like{{ page.status }}
.