pages-gem icon indicating copy to clipboard operation
pages-gem copied to clipboard

Site not rendering images

Open ddejohn opened this issue 4 years ago • 1 comments

I've searched far and wide and cannot for the life of me figure this out.

This issue affects

  • [x] The site generated by GitHub Pages
  • [ ] Building sites locally

What did you do (e.g., steps to reproduce)

I have images and gifs in /assets/visualizations/, and attempt to use relative links to those images in a blog post.

The blog post in question is here: https://ddejohn.github.io/2021/08/20/life.html

The blog's repo is here: https://github.com/ddejohn/ddejohn.github.io

I've tried loads of things based on stackoverflow and github issues discussions. Nothing seems to work. I've tried setting baseurl: "" and I've tried relative links in my markdown with and without a leading . symbol. I'm at wit's end, it seems like everything I find on SO and here in various Jekyll issues say to do different things and I can't find the "magic" combination.

My current _config.yml:

title: ddejohn/
email: [email protected]
description: A blog wherein I write about programming, mathematics, and my personal projects.
github_username: ddejohn
linkedin_username: ddejohn

theme: minima
show_excerpts: true

plugins:
  - jekyll-feed

What did you expect to happen?

Images to display.

What happened instead?

Images didn't display.

ddejohn avatar Aug 29 '21 01:08 ddejohn

ProTip: The _site folder (or any destination directory) is autogenerated. Never put your stuff into it. Jekyll never reads it.

To resolve your issue:

  1. Move assets/ directory from _site/ to the root.
  2. Delete _site/.
  3. Add _site/ to a file named .gitignore. Create one if it doesn't exist.
  4. Commit changes and push to GitHub.

ashmaroli avatar Aug 31 '21 11:08 ashmaroli