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!

For this project, we provide you with all the source code you need to get your blog up and running. So let's go.

Install the Prismic Command Line Tool

To get started with your website, install the command line tool. It allows you to quickly start JavaScript projects that access your Prismic backend.

If you don't already have it, make sure to first install npm on your machine.

Fire up a terminal (command prompt or similar on Windows) and run the following command.

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

The Prismic command is now available globally. We will now use that tool to launch this tutorial project. In the terminal, navigate to the location you want to launch your project and run the following command.

prismic theme https://github.com/prismicio/nuxtjs-blog.git --conf prismic.config.js

The prismic theme command will initialize a Nuxt.js project that is configured to connect with the repository you just created!

The command will end by displaying a link to your content repository backend in the form of https://your-repo-name.prismic.io.

Write some content

Start by filling in your photo, your name and a headline for your blog's home.

Go to "Content" and hit "New", choose the Blog's home type and fill it with your own content. Save and publish!

Now, write a few blog posts. Make sure to fill the mandatory UID field that is used for your post's URL. Save and publish!
 

Run the blog    

Go back to terminal (command prompt or similar on Windows), point it to your project location (cd your-project-folder) and run!

npm install
npm run dev  

This will launch a local development server at http://localhost:3000.
 

Deploy & go live!

If you want to deploy your website Heroku is a great option. Simply follow the instructions on the Nuxt.js website on how to deploy on Heroku. You'll notice some of the work has been done for you already.

And that's it deploy your website and your live.
 

Customize to your liking

You should easily find what to modify in the code to customize the blog: just edit the stylesheets and the templates to fit your design!

Just curious about the code?

If you aren't interested in recreating this project and would just like to look at the code then you can download the project here.

Did this answer your question?