Within each blog post, we have a CollectButton component that mints the NFT directly to the reader's wallet.
The key part of the component is the handleCollect function where we take the blog post metadata (title, description, and Collection address) and send that data to our Next.js API endpoint we just created.
Within each blog post, we need to include information about our blog post as well as the Collection we want the blog post NFTs to be a part of.
pages/your-blog-post/index.mdx
exportconstentry= { title:"Your Blog Post", description:"Add a description for your blog post", collectionAddress:"E6H1MYDiFhUkmAWPnxTMS9iEPpJtvMU6za5pvqUt6Hm3"}
Within the Underdog dashboard, you can create a new Collection for each blog post and upload unique artwork for each NFT.