github / pages-gem

A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages
http://pages.github.com
MIT License
1.83k stars 357 forks source link

Site not rendering images #783

Open ddejohn opened 3 years ago

ddejohn commented 3 years ago

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

This issue affects

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: ddejohn@pm.me
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.

ashmaroli commented 3 years ago

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.