-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Jekyll url is not applied to the View button #610
Comments
this has been brought up a few times I believe, and I have yet to see an official response. I was able to get this working on my personal fork, however I do not believe my method (hijacking the you can see my personal hack at this commit: lib/jekyll-admin/urlable.rb def scheme
JekyllAdmin.site.config["static_scheme"] || "http"
end
def host
JekyllAdmin.site.config["static_host"] || JekyllAdmin.site.config["host"].sub("127.0.0.1", "localhost")
end
def port
JekyllAdmin.site.config["static_port"] || JekyllAdmin.site.config["port"]
end ... then on my Jekyll install: _config.ymlstatic_scheme: https
static_host: [my domain name]
static_port: "443" this got things working for me 👍 |
Wow, indeed this should become a PR. This is indeed working as expected. For backwards compatibility change: JekyllAdmin.site.config["static_scheme"] || "http" To: JekyllAdmin.site.config["static_scheme"] || JekyllAdmin.site.config["scheme"] || "http" Thank you so much! Let's fix this once and forever people! Ps. Also in YML this is just fine: |
@i-a-n Thanks for the suggested solution. @ashmaroli Would you approve this? |
I would approve a tested Pull Request that proposes use of |
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 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 hope you get a reply so it can be merged. |
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 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. |
Can you clarify this? I'm running jekyll-admin behind a reverse-proxy and would love to get this in there. I think you are suggesting we have a setting that... if present will override the jekyll host config? Seems reasonable to me. |
It's a two year old issue. But as stated in my first issue description the website url is not being when indeed behind a reverse proxy (nginx). Causing those links not to work since they are pointing to local host with custom port. Instead of the domain name. |
No, i get your issue @Danger89... :) I would like this feature as well. My question for clarification was for @ashmaroli, as in what will it take to merge this pull request. |
Ow sorry my bad! @ashmaroli Your turn xD |
Description:
Pressing the
View
button in the admin panel the URL is pointing to http://localhost:4000. But I'm behind a reverse proxy called Nginx.Tell us a bit about yourself:
Steps to reproduce:
_config.yml
file, and seturl
key to:url: "https://yourdomain.com"
(baseurl
is just "/")yourdomain.com
as server_name in Nginx with alocation /
section containing at least:proxy_pass http://localhost:4000;
http://localhost:4000/jekyll/update/2020/11/19/welcome-to-jekyll.html
, which will NOT work.I expected the following:
I expect the View links to take the url settings into account. The link example above, should go to:
https://yourdomain.nl/jekyll/update/2020/11/19/welcome-to-jekyll.html
But got the following, instead:
http://localhost:4000/jekyll/update/2020/11/19/welcome-to-jekyll.html
I think it shouldn't be that hard to get this solved, I hope 👍🏽 ?
Regards,
Melroy van den Berg
The text was updated successfully, but these errors were encountered: