Run a pre-configured project
These docs rely on Slice Machine, which is in active development and subject to change. Content Relationships are not currently supported with Slices.
This article will show you how to get a pre-configured boiler plate project running so you can test all our features fast.
Before you start - Node Version
For this project to work correctly, you will need to have at least version 12.16.1 of node installed on your machine. You can check this by running the node -v command in your terminal.
1. Install Node
So we'll allow William Vincent and his slick tutorials to take you through the process.
2. Install the Prismic CLI
So now we'll install the Prismic CLI (command line interface), if you haven't already. This tool will allow you to interact with Prismic from your local machine for things like creating repositories. To install it globally run the following command.
npm install -g prismic-cli
yarn global add prismic-cli
Sometimes it's possible that a global -g command like this doesn't work because of permission levels on your machine.
If that's the case for you, try executing the sudo command below:
sudo npm install -g prismic-cli
sudo yarn global add prismic-cli
You will need to make sure you're using the latest version of the CLI, which you can check on npm. (Check your version by running prismic --version).
3. Sign in to Prismic with the CLI
If you don't have a Prismic account
After installing the CLI you should be able to create a Prismic account by running the following command:
If you already have a Prismic account
After making sure that you have the correct version of the CLI, you can log in to Prismic by running the following command.
5. Run the Theme command
The Prismic command is now available globally. We will now use that tool to launch this boiler plate project. In the terminal, navigate to the location you want to launch your project and run the following command. This command should configure your project, create a new Prismic repo for you and install all the node modules.
prismic theme --theme-url https://github.com/prismicio-community/nuxt-sm-tutorial-series --conf sm.json
6. Push your Shared Slices to Prismic
This sample project comes with pre-built Slice Machine components, so you'll need to send the Slices (Content Models) for these components to your newly created Prismic repo.
7. Add content to your repo
Now that you've added you Slices to your repo, you can start using them to build your pages. Simply select the green 'Pencil' icon and start creating your pages.
8. Run your project
Now you can run your project with the following command and view your published content locally.
npm run dev
Was this article helpful?
Can't find what you're looking for? Get in touch with us on our Community Forum.