Closed khannzxc closed 3 years ago
May i know your specific post & image location?
My post location is exampleSite/content/posts/test/test.md
and my image location is exampleSite/content/posts/test/
and the front matter is
---
weight: 1
title: "Test Post"
date: 2020-03-06T21:29:01+08:00
lastmod: 2020-03-05T21:29:01+08:00
draft: false
author: "FeelIt"
authorLink: "https://feelit.khusika.com"
description: "Discover what the Hugo - FeelIt theme is all about and the core-concepts behind it."
# featuredImage: "featured-image"
# featuredImagePreview: "featured-image-preview.webp"
resources:
- name: "featured-image"
src: "featured-image.webp"
tags: ["installation", "configuration"]
categories: ["documentation"]
lightgallery: false
toc:
auto: false
---
Some body text
My post location is
exampleSite/content/posts/test/test.md
and my image location isexampleSite/content/posts/test/
Correct your post location into exampleSite/content/posts/test/index.md
,
if yourimage.webp
is inside post/test
resources:
name: "featured-image"
src: "yourimage.webp"
or
featuredImage: "yourimage.webp"
Yes, it fixes the issue. when I renamed the post to index.md
But when I use netlify cms and add title to the forexample test title
it creates the post in exampleSite/posts
folder with file name test-title.md
.
Then it creates the problem even the images are present in exampleSite/posts
folder.
Screenshot is attached below.
I think it is not working with cms then, because cms does not create index.md
or if it create index.md
by using post title of index
then there will be only 1 index file in posts
folder
Sorry, i can't answer related to the CMS configuration. You have to adapt it by yourself.
I have create a post in
posts
folder. And in front matter I have added the image name and srcBut the image is not displaying. Clear the cache several times but not working. But in the default posts images are displaying correctly.
Steps to follow
posts
folderposts
folder