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
Extra forward slash in URLs when config["url"] has a trailing forward slash #6947
Comments
It seems that We should remove any trailing slash before creating the URL. |
@pathawks Shouldn't |
Maybe with Jekyll 4 we just do it automatically, and ensure That way, we can avoid doing each time the filter is invoked. |
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 latest If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open. This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions. |
github-pages
jekyll doctor
to check my configurationMy Reproduction Steps
I am opening this at the request of @pathawks (jekyll/jekyll-redirect-from#178 (comment)). It was initially posted here
jekyll/jekyll-redirect-from#178 (comment)
The issue relates to redirects (using the redirect-from plugin) on github pages vs. my local setup.
I've tested this on the same version of jekyll (3.7.3) and jekyll-redirect-from (0.13.0) as what is listed as current on github: https://pages.github.com/versions/
When using the redirect plugin i get
//
between the domain name and the path.When I'm using redirect_from on my jekyll page it works as expected locally. but on on the github page there is an extra slash.
As an example.
i redirect like this:
redirect_from: /summary/2017/
I don't know it is relevant, but my baseurl is "" (empty string).
When i curl the two different pages i get the following:
And on the github page:
The difference is in the
<script>
tag, and in the canonicallink
. As you will see there is a//
between my domain and the url path.solution
I found that this works as expected when i changed
url: http://inconvergent.net/
tourl: http://inconvergent.net
in the config file.The text was updated successfully, but these errors were encountered: