Closed patrickhlauke closed 5 years ago
/cc @jekyll/build
This gem uses Document#url
to determine the URL to which to redirect.
Are you speaking generally of both redirect_from
and redirect_to
pages?
@XhmikosR do you mind filling in info on the types of redirects that cause issues?
Any redirect has this behavior.
Anyway I don't see it as an issue. It's poor config IMO.
I second the need for this fix. I use 0.0.0.0 to test on different devices and I have to edit the config and restart to test redirects, then and edit the config restart again to go back to testing on mobile.
Forgive me as at I'm not too savvy when it comes to networking, but wouldn't the best option be to replace 0.0.0.0 with the local IP address upon generation?
@trigger-death You can use multiple config files with --config CONFIG_FILE[,CONFIG_FILE2,...]
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'll preface this by saying that I'm not 100% sure if this is something that can/should be done at this plugin's level or not. If I'm way off base here feel free to just close it.
Context is https://github.com/twbs/bootstrap/pull/27552 - we're using a Jekyll
host
value of0.0.0.0
to allow for access on the same local network when running documentation locally (see https://zarino.co.uk/post/jekyll-local-network/). However, this apparently conflicts with redirects, as the redirects then get rewritten with the0.0.0.0
url, which doesn't actually work / is magic in that it translates to127.0.0.1
andlocalhost
So currently, there's a bit of a conundrum - changing the _config.yml to have
host: "localhost"
solves the redirect issue, but breaks the local network access, andhost: 0.0.0.0
breaks the redirects but allows local network access. Is there any way / would it make sense for the redirect plugin here to special-case the magic0.0.0.0
value and internally treat it as / substitute it withlocalhost
?