Git Product home page Git Product logo

Comments (5)

wolfspyre avatar wolfspyre commented on June 13, 2024

can you share the relevant config entries, and show the directory path you have the images stored in?

from congo.

flexstrongo avatar flexstrongo commented on June 13, 2024

Below is the languages.en.toml file. The assets folder is in the root of my hugo folder, i.e: "siteFolder/assets". But, this also fails with the out of the box img/author.jpg from the theme/examplesite setting. No errors come up when starting the hugo server. I'd assume if the image path was wrong, it would bomb out with a missing file error or something.

languageCode = "en"
languageName = "English"
languageDirection = "ltr"
weight = 1

title = "Hugo Test"
copyright = "© 2024"

[params]
  dateFormat = "2 January 2006"

  mainSections = ["pages"]
  description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."

[params.author]
  name = "Author"
  image = "assets/author.jpg"
  headline = "Some Headline"
  bio = "This is an example author bio, and although there's a stock photo of a dog here, this article was actually created by a human. :dog:"
  links = [
    { x-twitter = "https://twitter.com/" },
   # { facebook = "https://facebook.com/" },
   # { linkedin = "https://linkedin.com/" },
   # { youtube = "https://youtube.com/" },
  ]```

from congo.

flexstrongo avatar flexstrongo commented on June 13, 2024

OK. I figured this out. The documentation wasn't super clear, but the default is that the theme already assumes that "assets" is the root directory for the photo. So, pointing just to "author.jpg" worked.

from congo.

flexstrongo avatar flexstrongo commented on June 13, 2024

Going to go ahead and close this

from congo.

wolfspyre avatar wolfspyre commented on June 13, 2024

OK. I figured this out. The documentation wasn't super clear, but the default is that the theme already assumes that "assets" is the root directory for the photo. So, pointing just to "author.jpg" worked.

Sweet!
The assets folder is a hugo thing.

here's a couple links to the hugo discourse forum discussing assets / static dirs:
https://discourse.gohugo.io/t/difference-between-asset-and-static-folder/41203
https://discourse.gohugo.io/t/are-assets-and-static-folders-interchangeable/36778

from congo.

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.