From the course: The Freelance Stack: Real Project with Next.js and Strapi
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Input blog article data on Strapi - Next.js Tutorial
From the course: The Freelance Stack: Real Project with Next.js and Strapi
Input blog article data on Strapi
We created all the content now in Strapi, which means we can now consume it from the front end and make our application basically a full-stack application with a headless CMS in the background for the blog page. How are we going to do that? Well, the first thing is we have to be able to fetch these blog articles. And for the blog article, we can obviously first check whether we can get that right here. We're going to hit API and then blog articles just like that. And we're going to see the forbidden error because what we haven't done yet when we fit in the content is to give the public user find access to this Part of our api now that we've done that we see We see all the articles Coming through which is perfect. There's one little thing that you already know We do have to populate deep to get the featured image because it is a relational field but otherwise we can now access data through this, which is great. If we go back to the code now, we can go into our blog page right here, and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.