-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
If bar.html
exists, then jekyll s
will show bar.html
for bar/.*
unless something else explicitly (but not implicitly) overrides it
#6475
Comments
Did I do everything correct with this issue or is anything missing to this getting looked at or confirmed? |
@janpio I can no longer see what you described above, in the test repo above.. |
Thanks, I will confirm the repro asap and get back to you. |
I can confirm that In fact, This is bad. |
If |
jekyll s
shows wrong content (with file and folder of same name)bar.html
exists, then jekyll s
will show bar.html
for bar/.*
unless something else explicitly (but not implicitly) overrides it
This behavior exists in |
Looking into this now. |
- bar.html - bar |- baz.html _GET /bar/_ _Before:_ Returns bar.html _After:_ Returns bar.html _GET /bar/baz_ _Before:_ Returns bar.html _After:_ Returns bar/baz.html _GET /bar/whatever_ _Before:_ Returns bar.html _After:_ Returns 404 This fixes jekyll#6475
Awesome! #6459 is probably related and (at least) partially fixed by your PR already. |
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
shows wrong content at files in the folder.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/baz
:bar.md
I think this is a serious bug. It probably is a regression of #6231, which tried to fix some related problems.
In
_site
everything is generated as it should:/bar.html
with content frombar.md
/bar/baz.html
with content frombar/baz.md
So the problem is in the way
jekyll s
decides which file to serve.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 see the wrong content for "Baz" (only 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: