Too busy to start from scratch, but excited to start learning how to use an API-based CMS? Get a blog up and running in minutes. Modify and adapt it to your liking; it's all yours!
1. Launch the project
First, Install the prismic-cli package. Launch a terminal instance and run the following command to install the package globally.
npm install -g prismic-cli
Sometimes it's possible that this command doesn't work. If that's the case for you, try executing a sudo command:
sudo npm install -g prismic-cli
Once it's been installed, navigate where you want to create your new project folder and run the following command:
prismic theme --theme-url https://github.com/prismicio/nextjs-blog --conf prismic-configuration.js
This will create a new Prismic content repository, set up the custom types, create a few documents, and install the project code.
2. Run the website
Now it's time to see things working! Go back to the terminal, point it to your project location, and run:
npm run dev
This will launch a local development server at http://localhost:3000.
3. Deploys made easy with Vercel
With Prismic and Next, it's straightforward to deploy a blazing-fast, dynamic site. Learn how to deploy a statically-generated Next site for free on Vercel in three easy steps:
- Sign up to Github and push your project to a new repository
- Sign up to Vercel and Import your project
- Then click Deploy, wait a bit for the project to build, and then your site will be live!
You might need to add more configuration if you included any statically generated pages in your project. If so, you need to set up webhooks to update those pages when there are changes in your Prismic repo.
Customize to your liking
You should easily find what to modify in the code to customize the website: edit the stylesheets and the templates to fit your design!