CLI
Getting started with Tipe using the CLI is fast and easy.
Install the CLI
With NPM
With YARN
Initialize Tipe
Be sure to change directories into your project where you'd like to install tipe. Next, just run the init
command from the root of your project's directory.
After the init
command has finished, you will have the following:
- A account on Tipe
- A Tipe project
- An environment for your project
- Some seeded content in your environment
- A seeded schema in your app directory that matches the seeeded content in tipe.
- The Tipe editor installed into your app and ready to be used.
Query your content
Now Let's fetch some content from tipe and use it in your pages. Go you your index page or any page where you want to use some tipe content. Don't worry, at this point, you'll be using seeded content that we created for you, you'll have the chance to change your schema and create new content.
In your page you'll need to import a few things.
To fetch the content, you can use getStaticContent
.
We will then use the props that getStaticContent
provides our page component with to render our content and setup our button to edit the page.
All together
You should now be able to some content from tipe in your h1
on your page. You will also see an edit button on the bottom right 🎉