Jekyll website layouts not displaying correctly on GitHub Pages

I just started working with Jekyll and GitHub Pages recently. I’m building a website and everything works perfectly when I test it locally on my computer. All the pages show up with the right design and formatting.

But when I push my code to GitHub Pages, some of my pages don’t show the layout at all. They just display as plain text without any styling.

Specifically, I have markdown files in my collection directory that should use a specific layout template, but they’re not picking it up when GitHub builds the site. The layout I want them to use is called subpage.

Has anyone run into this problem before? What could be causing the layouts to work locally but not on GitHub Pages?

Had the same problem when I first deployed my Jekyll site. Check your layout file’s naming - GitHub Pages runs on Linux, so it’s case-sensitive. Make sure the name matches exactly, including caps. Also verify the layout file is in the _layouts folder with a .html extension. Double-check your YAML front matter too - syntax errors there will mess up Jekyll’s build process.