Set up the blog
- 1
Install the package
Terminalnpm install honeytraffic-next-js-blog - 2
Add your API key
Generate a key from Settings → Publishing → Next.js Blog in your dashboard, then add it to your
.env.local:.env.localHONEYTRAFFIC_BLOG_API_KEY=your_api_keyKeep this key server-side only. Never prefix it withNEXT_PUBLIC_. - 3
Scaffold the blog
Terminalnpx 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
Allow the image domain
Cover and social images are served from HoneyTraffic's Supabase storage. If you render them with
next/image, allow that domain inimages.remotePatterns:next.config.jsmodule.exports = { images: { remotePatterns: [ { protocol: "https", hostname: "*.supabase.co", pathname: "/storage/v1/object/public/**" }, ], }, };Each article'scoverImageUrl(andogImageUrlforog:image) shows the exact host. Restartnext devafter changingnext.config.js. - 5
Run it
Terminalnpm run devOpen
/blog. Pages use daily ISR (revalidate: 86400), so 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:
app/blog/page.js
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 and response shapes are in the API reference.