Giter VIP home page Giter VIP logo

Comments (8)

zzossig avatar zzossig commented on July 18, 2024 1

This is very strange.
When I tested it on Window10, it works well, But
When I tested it on Ubuntu, the Hugo is not following the lookup order.
Hugo must find a file at root/static image first. If the file does not exist, then Hugo searches the file at the theme folder, which is not the case on Ubuntu.
I think I have to open a new issue on the Hugo repo regarding this.
I'm closing this issue now.

The quick solution: just change the filename or path, and you are good to go

from hugo-theme-zzo.

zzossig avatar zzossig commented on July 18, 2024

Did you set param at config/_default/params.toml ?

...
homeHeaderType = "img"
...

from hugo-theme-zzo.

nisrulz avatar nisrulz commented on July 18, 2024

Yes. PFA the screenshots.

Screenshot from 2019-12-30 14-04-54
Screenshot from 2019-12-30 14-05-35

from hugo-theme-zzo.

zzossig avatar zzossig commented on July 18, 2024

Then, did you make a _index.md file at content folder?
주석 2019-12-30 220835

the file name, file extension, file path don't need to be the same.

from hugo-theme-zzo.

nisrulz avatar nisrulz commented on July 18, 2024

Yes, sire 😺

Screenshot from 2019-12-30 14-09-18

from hugo-theme-zzo.

zzossig avatar zzossig commented on July 18, 2024

Then, it must work if you have a file at root/static/images/header/background.jpg file

from hugo-theme-zzo.

nisrulz avatar nisrulz commented on July 18, 2024

Exactly. That is what I shared above. It just doesn't work. πŸ€·β€β™‚οΈ

from hugo-theme-zzo.

nisrulz avatar nisrulz commented on July 18, 2024

An update:
Moving background.jpg outside of header folder into its parent images and updating the link in _index.en.md file:

imageSrc: images/background.jpg

Fixed the issue. I can now load the custom background image.

Note: I tested with the image being in header folder vs its parent images and it only works when it is inside images and not when it is placed inside header child folder.

from hugo-theme-zzo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.