@tezblogs/next
v0.1.1
Published
Drop TezBlogs AI-generated blog posts into your Next.js app. Native RSC, inherits your Tailwind styles.
Maintainers
Readme
@tezblogs/next
Drop TezBlogs AI-generated blog posts into your Next.js app. Native React Server Components, semantic HTML, and zero shipped CSS — posts inherit your fonts, colors, and Tailwind theme. No iframes, ever.
npm i @tezblogs/next// lib/tezblogs.ts
import { createTezBlogsClient } from '@tezblogs/next'
export const tezblogs = createTezBlogsClient({
apiKey: process.env.TEZBLOGS_API_KEY!,
baseUrl: process.env.TEZBLOGS_API_URL!,
})// app/blog/[slug]/page.tsx
import { BlogPost } from '@tezblogs/next'
import { notFound } from 'next/navigation'
import { tezblogs } from '@/lib/tezblogs'
export default async function Page({ params }) {
const post = await tezblogs.getPost((await params).slug)
if (!post) notFound()
return <BlogPost post={post} />
}That's the whole install. Also included: <BlogIndex>, postMetadata() for full
OG/Twitter/canonical tags, generateStaticParams support via getSlugs(), and
createRevalidateHandler() so published posts appear via ISR without a redeploy.
Docs: quickstart, styling guide, and API reference at your TezBlogs dashboard.
