gitHub pages odd behaviors with filename extensions #22612
-
Behavior: test.md file is returning 404 in subdirectory on github pages. Behavior: test.html shows rendering of test.md. Actual test.html file is ignored. Behavior: test.txt renders test.txt {{ with variables parsed }} inside of _layouts/default.html file and then is converted to source text in the browser similar to view source. https://sflanders95.github.io/EmpireMillenniumChatBlockerChromeExt/docs/test.md (404) https://sflanders95.github.io/EmpireMillenniumChatBlockerChromeExt/docs/test.html (returns test.md & jekyll template, ignores file: test.html in same directory) https://sflanders95.github.io/EmpireMillenniumChatBlockerChromeExt/docs/test.txt (returns test.txt & jekyll template) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is all expected behavior based on how Jekyll processes your repository during its build process. It’s not that the I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
It does help thank you. Since that post I’ve modified the environment so that I can run jekyll build and actually see what is being generated in the ./_site/ directory. That directory I believe is hidden on the github pages site so I didn’t previously notice generated static files & structure. I was modifying and pushing w/o building locally. So your response is correct, it works as designed. Building locally also helps partially explain what is happening to ./docs/test.txt - That text file is getting processed with ./_layouts/default.html resulting in ./_site/docs/test.txt (retaining the .txt extension). So when the browser requests /docs/test.txt it is getting back the combined documents as html but served as content-type: text/plain |
Beta Was this translation helpful? Give feedback.
This is all expected behavior based on how Jekyll processes your repository during its build process. It’s not that the
test.html
file is ignored, it is just overwritten during the build process by the conversion oftest.md
totest.html
.I hope that helps!