What do we need to build or fix?
We need to implement the logic to connect our single blog post UI with dev.to. This involves automatically pulling content data from dev.to and ensuring users are directed to the corresponding single post page on our Next.js website instead of being redirected to dev.to. This will help keep users on our website longer.
Technical details1. Set Up API Call to dev.to:
Extend the getStaticProps function in pages/blog/posts/[id].js to fetch detailed post content from dev.to using their API.
Use the dev.to API to fetch the content for individual blog posts based on their id.
2. Update Single Blog Post UI:
Utilize the fetched data in the BlogPostContainer component.
Pass the necessary data (title, content, author, etc.) to the BlogPostContainer and PostContent.
3. Routing Logic:
Ensure that clicking on a blog post link in the blog post list routes to the new single blog post page using dynamic routing.
Update BlogPostsContainer to link to the new [id].js page.
What do we need to build or fix? We need to implement the logic to connect our single blog post UI with dev.to. This involves automatically pulling content data from dev.to and ensuring users are directed to the corresponding single post page on our Next.js website instead of being redirected to dev.to. This will help keep users on our website longer.
Technical details 1. Set Up API Call to dev.to:
getStaticProps
function inpages/blog/posts/[id].js
to fetch detailed post content from dev.to using their API.2. Update Single Blog Post UI:
3. Routing Logic:
Approach suggestions
pages/blog/posts/[id].js
Deadline Please keep in mind that once you assign this task to yourself, you'll need to complete it in 15 days.
Acceptance criteria
yarn build
locally to solve the issues and commit the changes.