Next.js Blog
Drop a fully working /blog into your Next.js App Router project, backed by your HoneyTraffic articles.
1. Install the package
npm install honeytraffic-next-js-blog2. Add your API key
Generate a key from Integrations → Next.js Blog in your dashboard, then add it to your .env.local:
HONEYTRAFFIC_BLOG_API_KEY=your_api_keyKeep this server-side only — never prefix it with `NEXT_PUBLIC_`.
3. Scaffold the blog
npx honeytraffic-next-js-blog initThis adds an app/blog/ folder to your project:
app/blog/page.js— article listapp/blog/[slug]/page.js— article detail, with JSON-LD schemaapp/blog/tag/[slug]/page.js— articles filtered by content angleapp/blog/sitemap.xml/route.js— a blog-only sitemap
4. Run it
npm run devOpen /blog. Pages use daily ISR (revalidate: 86400) — newly published articles can take up to a day to appear unless you redeploy.
Using the client directly
If you'd rather build your own pages instead of the scaffolded ones, the package exports a small client:
import { getArticles, getArticleBySlug } from "honeytraffic-next-js-blog";
const { articles, total } = await getArticles({ limit: 20, offset: 0 });
const article = await getArticleBySlug("my-article-slug");Full request/response shapes: see the API reference.