0
votes

Is there any reason that images inside a subfolder wouldn't be available via GH Pages? I've got Jekyll building out the _site folder, and everything seems to be working fine, but a couple of my images won't show up. The structure:

_site /images /thumbnails /medium file.jpg file2.jpg etc...

The images inside the parent /images folder work just fine. When I try to call the /thumbnails or /medium images I get a 404.

Here is the repo, showing the images in place: https://github.com/clarklab/chowdown/tree/gh-pages/_site/images

Here is an image on GH Pages from the parent folder, working just fine, and here is a thumbnail, giving me a 404.

This isn't the usual "check your paths inside your templates" issue, these are actual images paths returning a 404. Anyone seen this?

Any ideas?

2

2 Answers

1
votes

You are not accessing the content in _site directory. http://chowdown.io/images/broccoli-beer-cheese-soup.jpg refers to the top level images directory and not the images inside _site.

0
votes

Once you push your code to github, github pages generates you site and push the result on a web server. Uploading _site to your repository is useless as it's not used at all when serving http://chowdown.io/.

As I see that you have a plugins, you certainly need to generate you site locally and push the result (content of _site folder) to your repository.

In this case you'll have to store you code in master and the generated files in gh-pages. You also have to add an empty .nojekyll file at the root of your repository (gh-pages) in order to instruct gh-pages not to generate your site, but copy all your files as static files on the web server.

You can find a step by step versioning scheme here https://stackoverflow.com/a/28252200/1548376.