Create a Prismic IO Respository for Blog 👨🏽‍💻

matheusmprado

Matheus Maximiliano

Posted on January 20, 2022

Create a Prismic IO Respository for Blog 👨🏽‍💻

what is Prismic IO?

Prismic is a Headless CMS very simples to work, a tool for editing online content totally custom with a very nice API and a great free plan... Basically you keep your content in a content repository that you can query via its simples REST API with the prismisc client.

Creating Prismic account

Now we going create a prismic account, so, fill the information's and create your account. After your account created, open a new repository like this.

prismic created repository

In prismic we have a two types of contents, Repeatable and unique, lets go understand the differences:

  • Repeatable is used to create content that you need create more that one, exemple:

    • Posts blog;
    • faq contents;
    • testimonials;
  • Unique is used in singles pages content like a about us page in your site.

After created your repository, we will go to build our first type content. This type is it a repeatable **type called **posts, and here we add this modes with field names.

If you want create more types, feel freedom for this, custom and create of your way.

  • UID type | field name: uid
  • Title type | field name: title
  • Rich Text | field name: content

post type

After created just save.

Get Environments Variables

To connect a Prisma client you need a two environments variables, the PRISMIC_ACCESS_TOKENand PRISMIC_ENDPOINT, this variables. you can use in .env.local for projects.

For get your endpoint, he finds himself in top of the page settings. And for generate your access token, fill the application name in prismic settings and add application, so, now we have this two information for connect with prismic client.

Conclusion

The prismic IO is a very good CMS, with a very nice free plan, so you can create news projects and use for manager your contents, and create singles pages, or repeatables contens, and in a very easy way to do.

💖 💪 🙅 🚩
matheusmprado
Matheus Maximiliano

Posted on January 20, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related