Boilerplate Blog with <CommentsEmbed />
The example showcases how to integrate the Ethereum Comments Protocol into a Next.js blog using the <CommentsEmbed /> react component:
- Embed comments on blog posts
- Display comments by a specific author
- Customize the comment embed appearance
- Handle dark/light theme modes
Installation
pnpm installDevelopment
- Copy
.env.exampleto.env.local:
cp .env.example .env.local- Configure environment variables in
.env.local:
NEXT_PUBLIC_ECP_ETH_EMBED_URL(Optional): URL to ecp.eth embed renderer. Defaults to locally hosted embed server.NEXT_PUBLIC_URL: URL of the embed demo blog deployment, used to construct target URI for embedded comments.
- Start the development server:
pnpm devThe application will be available at http://localhost:3003.
Building for Production
pnpm buildStarting Production Server
pnpm start