Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Stackbit's DIY starter for Next.js — a file-based content Jamstack theme that deploys static sites to Netlify.
The DIY Nextjs Theme is a Stackbit starter template that generates a static Jamstack website built on the Next.js framework, with all content stored as files inside a Git repository and deployable to serverless platforms such as Netlify.
The DIY Nextjs Theme is a pre-configured website starter created by Stackbit. It uses Next.js as the React framework and reads the site's content from files, normalizes it using Sourcebit plugins, and then statically generates HTML pages. The template is the foundation for the digitale-dinge.de website and is documented as being maintained manually in that repository.
sourcebit-source-filesystem and sourcebit-target-next plugins to read content files, normalize the data, and provide it to Next.js pages.npm run develop starts a local server at http://localhost:3000; editing content files updates the browser instantly.npm run build command produces a static site in the out folder, ready to be served by any static file host or by http-server.npm install and npm run develop, and preview changes at http://localhost:3000 with live reload.npm run build to export a static out folder, then host it on Netlify or any static file server.The theme reads website content from files in the Git repository. When you start the development server or build the site, Sourcebit's filesystem plugin reads those files, the target plugin normalizes the data and passes it to Next.js pages, which statically generate the HTML. In development, Sourcebit watches the content files and triggers live browser updates. For deployment, Stackbit connects the GitHub repository to a Netlify site, and every push to the repository triggers a new static export via a webhook.
Click the "Create with Stackbit" link from the theme's repository page or use the direct Stackbit create URL. Stackbit will generate a GitHub repository, set up a Netlify site, deploy it, and create a Stackbit project for visual editing.
Sourcebit is the tool that reads the website's content from files and supplies it to Next.js. The template uses two plugins: sourcebit-source-filesystem to fetch content from the filesystem and sourcebit-target-next to deliver the normalized data to Next.js pages.
The build output is a static out folder, so you can upload it to any static hosting provider. The README specifically mentions Netlify and suggests http-server for local testing, but any serverless or static CDN should work.
When you run npm run develop, Sourcebit watches the content files. Any change you save is immediately processed and pushed to the browser, so you see your updates without restarting the server.
