How do I add thumbnail images to the blog posts? #256
-
I'm really sorry that I have to make this post but I'm a noob in website stuff and am trying to fumble through this. For two and a half weekends now I've been trying to get thumbnail images to show up on the blog page like in this example from the recipe blog. I understand that the index.js says how stuff is rendered on the page and looking at the tambouille-blog code I tried my hardest to copy bit by bit but I always get some sort of error. Occasionally I manage to fix them but then ultimately get stuck at some point and need to revert. Don't really know who to ask or where to look for answers except here. tldr: how do I add a thumbnail image to the blog post list? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
simply add these lines to your
you should also include and import nextjs Image Component at top of the page(s): for more information: next/image |
Beta Was this translation helpful? Give feedback.
simply add these lines to your
ListLayout.js
/index.js
file after</time></dd>
line:you should also include
images
into your frontMatter:const { slug, date, title, summary, tags, images } = frontMatter
and import nextjs Image Component at top of the page(s):