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 s
redirects to slightly wrong URL (with file and folder of same name)
#6459
Comments
jekyll s
behavior with file and folder of same namejekyll s
redirects to slightly wrong URL (with file and folder of same name)
This comment has been minimized.
This comment has been minimized.
That were some short two months... |
I've just run into this same issue, running 3.6.2. I have the following in permalink: /:categories/:year/:month/:day/:title # no extensions or trailing slashes
collections:
team:
output: true And a source directory like this:
Produces a
And then visiting:
So far so good. But then:
So nothings mega broken, it's mainly just disconcerting because Jekyll generates links correctly to |
I have the very same problem as well described by @janpio and @stevetweeddale. Any updates on this? I'm Using Jekyll 3.8.2, if that's of any help. Edit: I believe this behaviour is intended to make sure that if a collection, say Is it possible to take a closer look and reopen this issue @DirtyF ? |
Jekyllbot – cold as ice! Sooooo… I’ve only just looked at the aria-label for the 'stale' label, but otherwise, I was left wondering if this issue was closed 'works as designed'? 'Resolved'? 'Closed: won't fix'? I normally wouldn't expect a bug report to be closed when there's no reason to believe the bug isn't reproducible and valid. I use "open issues" as a vague metric for "potentially unresolved known bugs" quite a bit. Maybe I shouldn't! As such, I'd suggest the robo-wording/labels could potentially do with some work. Because Jekyllbot initially asking for more info is fine I think: it’s when that effort (understanding the issue, producing a reduced test case, writing up findings) is proven wasted when the issue is summarily dismissed 2 months later… well, doesn’t make you feel like bothering next time. Maybe something along the lines of "We're sorry to anyone who spent time investigating, producing reduced test cases and reporting – but we're not going to get around to working on this. If you're able to contribute a PR feel free, but otherwise we are sorry that our time is limited and other issues must take priority." Anyway, I'd hate to sound like a whiner so thanks for all your work on Jekyll! I'm sorry that I'm not familiar enough with Ruby to take a stab at this issue. |
We upgraded Jekyll to 2.6.3 (a minor version upgrade from 2.4.3) to fix a security vulnerability, but the entire 2.6.x line has a bug with how URLs are handled in the built-in web server. (Fixed here: jekyll/jekyll#6459 and jekyll/jekyll#6475, originally introduced in the fix to jekyll/jekyll#6222 (comment)). Anyway, 2.8.5 includes a fix and generates an identical `_site` directory on disk, so should be all good.
If a file and a folder have the same "permalink" name,
jekyll s
redirects to a slighty incorrect URL.github-pages
jekyll doctor
to check my configurationWindows Linux Subsystem,
bash
via Windows 10 PowershellMy Reproduction Steps
jekyll s
does strange things when a file has the same name as a folder:permalink: /:path
bar.md
, should render at/bar
bar/baz.md
, should render at/bar/baz
Unfortunately:
On accessing
/bar
:/bar/
(had to go tobar.html
manually).bar.md
(fixed in Fix serving files that clash with directories (#6222) #6231) but still redirects to/bar/
.In
_site
everything is generated as it should:/bar.html
with content frombar.md
Per the configured permalink, this should be accessible as
/bar
.Example repo
Here is a repo that shows this exact scenario:
https://github.com/janpio/jekyll-path-test
Use the site navigation for the three example pages.
If you use
jekyll s
, note how you are redirected on "Bar" (3.5.2 and 3.6.x).(The project also includes 3 collections that test further iterations of this problem:, _test1 and _test2 with
.html
ending are fine, but _test3 has the exact same problem.)The Output I Wanted
You can see how everything should work at Github Pages:
https://janpio.github.io/jekyll-path-test/
The text was updated successfully, but these errors were encountered: