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
⚠️ Prismic CLI version
Make sure you're using the latest version of the CLI, which you can check on npm; otherwise, the theme command won't add any Custom Types or Content correctly to the newly created repository.
Check your version by running
prismic --version command in your terminal.
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/php-blog --conf config.php
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, open your project folder in the terminal and run the following command:
Then this next command will launch a local development server at http://localhost:8080.
Now all of your content is displayed!
3. Deploy & go live!
Create a file with the name Procfile file at your application root. Put the following code in the Procfile file:
web: vendor/bin/heroku-php-apache2 public
Create a new Heroku application:
Initialize a new Git repository:
heroku git:remote -a your-heroku-app-name
Commit your code to the Git repository and deploy it to Heroku:
git add .
git commit -am "make it better"
git push heroku master
Ensure you have at least one node running:
heroku ps:scale web=1
You can now browse your application online:
Customize to your likings
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!