create-dropinblog-nextjs
v1.0.2
Published
This is a CLI tool to create a Next.js blog with DropInBlog integration.
Maintainers
Readme
@dropinblog/nextjs-rendered-starter-kit
A CLI tool to quickly add a DropInBlog-powered /blog route and supporting library to your Next.js project.
Features
- Installs a ready-to-use
/blogroute with DropInBlog integration. - Adds a
/dib-libfolder with API helpers. - Supports Next.js projects with or without a
src/directory. - Safe: will not overwrite existing
/blogor/dib-libfolders.
Installation
npm install @dropinblog/nextjs-renderedUsage
Run the CLI in the root of your Next.js project:
npx create-dropinblog-nextjsYou will be prompted to confirm if your project uses a src/ directory.
- If yes,
/blogand/dib-libwill be added tosrc/appandsrc/dib-lib. - If no, they will be added to
appanddib-libat the project root.
What’s Included
/blog: All the necessary pages for sitemap, posts, categories, authors, feeds, and pagination./dib-lib/api.ts: Pre-configured DropInBlog API helper.
Configuration
Open
dib-lib/api.tsand replace the placeholders with your actual DropInBlog API token and blog ID:const token = 'YOUR_DROPINBLOG_API_TOKEN'; // Replace with your actual API token const blogId = 'YOUR_BLOG_ID'; // Replace with your actual blog IDDeploy or run your Next.js app. The
/blogroute is now live and powered by DropInBlog.
Requirements
- Node.js 16+
- Next.js 13+ (with App Router)
License
ISC
