Product
Resources
Maxime Castres
If you follow the Strapi news, you probably noticed last February the Strapi Starter for a Gatsby Blog which allows you to get started with a blog template running on Gatsby and Strapi. It's not up-to-date with the latest version of Strapi anymore, this is why we are excited to announce the release of a brand new Strapi Starter Gatsby Blog including way more features than the former one.
Let me explain why.
We noticed that many of you are building blogs with Strapi. Last year, I made a series of blog starters fitting the needs of many developers by offering a total of 6 frontend frameworks including Gatsby, React, Next, Vue, Nuxt and Angular.
However, we had the feeling this could send the message that Strapi can only be used for making blog websites. And you can do much more with Strapi.
It is with a new approach that we offer you this new starters series. The idea is to showcase that any application can be built with Strapi. For this new series, you will learn to create a broad range of applications.
For our first starter release in this series, we improved the former Gatsby blog starter by adding requested features from the community. Remi will soon release another starter for a corporate website based on Next.js, with a content architecture similar to the one used for our very own strapi.io website.
We are only at the beginning and we promise to expand the frontend stack for all other types of applications. The next one will be for Vue.js developers ;)
To deploy the Strapi instance you'll need:
Once you have created these accounts you can deploy your instance by clicking on this button.
On Vercel
To deploy the Gatsby blog you'll need:
On Gatsby Cloud
You may want to deploy this starter frontend on Gatsby Cloud in order to try the Gatsby Preview maybe!
You'll be asked to select the repository you want to use
frontend
in this starterAPI_URL
for both of your Builds Environment variables
and Preview Environment variables
(we consider that you deployed your strapi server)Now you'll need to create a Webhook on your strapi server in order to tell Gatsby cloud to build your Gatsby project each time you create/update/delete content:
/admin/settings/webhooks
Gatsby Cloud
https://webhook.gatsbyjs.com/hooks/data_source/
without the /publish/
Entry
and Media
That's it! Now Strapi will inform Gatsby Cloud to build your Gatsby project every time you create/update/delete content.
true
for article, category and userClone the repository
git clone https://github.com/strapi/strapi-starter-gatsby-blog-v2.git
cd strapi-starter-gatsby-blog-v2
Backend
Install dependencies, insert the data and run your server
# Using yarn
yarn install
yarn develop
# Using npm
npm install
npm run develop
Frontend
# Using yarn
yarn install
yarn develop
# Using npm
npm install
npm run develop
Gatsby server is running here => http://localhost:8000
This starter allows you to use the Administrator Roles & Permissions feature. Let's see what you can do with it!
You can see all the Roles in your Strapi application. Only 3 Roles are available in the Community Edition. You can have an unlimited number of roles by upgrading your plan to the Enterprise Edition. You can edit the permission of these roles:
Here you can see all your users. For now, you only have your administrator! Let's create an editor user!
Create New User
button and fill the form.You'll be asked to send the confirmation link to the editor, but since you are the editor just copy it in a new tab.
Great! Now you are logged in as an editor in your Strapi application. Depending on what the editor can access, the UI of the admin can change, here you can see that you only see the collections types, single types and the Media Library. Feel free to change the permissions of this role :)
If you liked this starter and want to develop a version of it with another frontend framework (Vue.js, Next.js or 11ty for example). Feel free to submit a Topic idea here!
Thank you for taking the time to read this blog post, I'll see you soon with a new starter ;) Enjoy this starter!