menu

Academic

Chat about Source Themes Academic, the page builder for Hugo 👩‍💻📝🚀

Channels
Team

Can't add images to my blog post

June 2, 2020 at 5:03pm

Can't add images to my blog post

June 2, 2020 at 5:03pm (Edited 30 days ago)
I tried to add an image to my first blog post. I first put the image on that posts folder then used image = "featured.jpg" but I'm getting the error message "C:\academic-kickstart\content\post\post1\post1.md:16:1": failed to unmarshal YAML: yaml: line 15: did not find expected key"
also tried putting the image in the static/img but getting the same error. image = "static/img/featured.jpg" Anyone knows how to fix it? Thanks in advance.

June 2, 2020 at 5:15pm
Follow the instructions here. You seem to be using an old version of the front matter
like-fill
1
  • reply
  • like
Follow the instructions here. You seem to be using an old version of the front matter
I tried that too but it's just not showing the image.
  • reply
  • like
I tried that too but it's just not showing the image.
The featured image should be in the same folder as your post1.md file
  • reply
  • like
The featured image should be in the same folder as your post1.md file
yeah I've put both the post1.md and the featured.jpg in the post1 folder. No idea why its still not working.
  • reply
  • like
what version of Hugo Academic and Hugo are you using?
  • reply
  • like
I'm using the Hugo Academic verion : 4.8.0 and Hugo v0.71.0
Edited
  • reply
  • like
I'm not sure but I'd say that your file post1.md should be named just index.md
like-fill
1
  • reply
  • like
I'm not sure but I'd say that your file post1.md should be named just index.md
That worked!!! Thank you very much.
like-fill
1
  • reply
  • like