surjithctly / neat-starter

Starter Template for Netlify CMS, Eleventy, Alpine JS & Tailwind CSS
https://neat-starter.netlify.app/
MIT License
333 stars 105 forks source link

After adding image using NetlifyCMS, image is present but not visible in browser display #1

Closed victorkane closed 3 years ago

victorkane commented 3 years ago

Hi there! A pleasure to try out this cool starter.

In the Netlify CMS Start with a template docs, I clicked on "deploy to netlify" using the eleventy starter link. Everything deployed fine, and I was able to use the Netlify CMS and modify several blog posts.

However, I added an image (clicked on the visual editor + image link, uploaded a 136K image), and everything went through fine (image visible in CMS, image visible in GitHub in the image path). But when the site was successfully deployed, even though inspection of code shows:


<article class="prose lg:prose-xl my-4 mx-auto">
        <p><img src="/src/static/img/20200928-norita.jpg" alt="Norita" title="Norita en la reunión"></p>
<p>Norita se encontró con los de la revista el domingo.</p>
<p>Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.</p>
<h2>Section Header</h2>
<p>Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line.</p>
</article>```

The image is not visible in the browser display. It is not clear to my why this is. Can you help me? Thanks in anticipation, and thanks for a great 11ty starter!
victorkane commented 3 years ago

Ah! If I edit the image path to src="/static/img/20200928-norita.jpg" (removing the initial /src), it works. But where in the code should things be changed so that the source is placed correctly? Thanks!

surjithctly commented 3 years ago

Hello,

Thanks for trying it. Glad it works for you.

I have moved the code to src/ to make it cleaner. I guess thats why this error happened.

I will see what I can do.

Thanks for reporting.

surjithctly commented 3 years ago

Fixed. Thanks again 👍