404 on Image in content/myfolder/assets/image.png

Hi!

I am creating a Hugo site using Gitlab Pages and am encountering some issues with images inside my pages. I have read the docs and used the static directory for my logo and favicon. My site is to host my teaching resources, and I pull in these resources using git submodules and symlink them into the correct place.

URL: https://science.lesueur.nz/10scie/fire-and-fuels/slides/7-hydrocarbons.html#/4

I am trying to load an image located at:
content/10SCIE/fire-and-fuels/slides/assets/7-hydrocarbon-formation.png

which comes through as an HTTP request at this URL:
https://science.lesueur.nz/10scie/fire-and-fuels/slides/assets/7-hydrocarbon-formation.png

which as far as I can tell is the correct URL and should return an image.

If it helps, here is my directory structure:

I have read about Page Bundles, but I cannot see why having my assets in a subdirectory instead of a flat structure would change the functionality.

Here is my config.toml if that helps!

baseurl = "https://finnito.gitlab.io/science/"
contentdir    = "content"
layoutdir     = "layouts"
publishdir    = "public"
title = "Science with LSF"
canonifyurls  = true
uglyurls = true
staticDir = ["static", "content"]

DefaultContentLanguage = "en"
theme = "beautifulhugo"
metaDataFormat = "yaml"
pygmentsUseClasses = true
pygmentCodeFences = true

[Params]
  subtitle = "Science Courses taught by Finn LeSueur"
  logo = "logo.png"
  favicon = "favicon.ico"
  dateFormat = "January 2, 2006"
  commit = true
  rss = true
  comments = false

[Author]
  name = "Finn LeSueur"
  email = "lsf@cashmere.school.nz"
  gitlab = "Finnito"


# ====================
# 9SCIE
# ====================
[[menu.main]]
    name = "9SCIE"
    url = "page/9scie"
    weight = 1

# ====================
# 10SCIE
# ====================
[[menu.main]]
    name = "10SCIE"
    url = "/10scie"
    weight = 2

[[menu.main]]
    parent = "10SCIE"
    name = "Fire & Fuels"
    url = "10scie/fire-and-fuels"
    weight = 5

# ====================
# 11SCIE
# ====================
[[menu.main]]
    name = "11SCI"
    url = ""
    weight = 3

# ====================
# 12PHY
# ====================
[[menu.main]]
    name = "12PHY"
    url = ""
    weight = 4

# ====================
# 13PHY
# ====================
[[menu.main]]
    name = "13PHY"
    url = ""
    weight = 5

Any tips as to what I have missed would be most appreciated!
Let me know if I can provide anything else of use.

Your server runs on linux. Which means SCIE is NOT scie. The image is not at the link above, but the link the linux would expect: https://science.lesueur.nz/10SCIE/fire-and-fuels/slides/assets/7-hydrocarbon-formation.png.

https://science.lesueur.nz/10SCIE/fire-and-fuels/slides/assets/7-hydrocarbon-formation.png

1 Like

In General, my tip would be to always use lower case in folder names and filenames of your site. Less confusion if the system automates something.

Thank you! I definitely spent too long looking at it last night. I appreciate you catching that for me!

Finn