In this guide you will learn what models are in CMS Husar.ai and how to create them using the post (blog post) model as an example. This is the basic knowledge that will allow you to start organizing your own content in the system.
The first step is to name the new model. In our example, we simply call it post.
After creating the model, we move to the view, where you can add individual fields. For a typical blog post, for example, the key fields will be:
By selecting the appropriate field types, you specify what kind of data you want to store.
You can also add another field, such as. image - to assign an image to the post. You set the order of the fields according to your preference.
After saving the model, the CMS automatically generates sample (mock) data so that you can more easily evaluate how your model looks and how each field looks in practice.
In this step you can also add dedicated styles to the fields. We skip this step in this guide, but you can find more about styling fields in a separate document.
Create a new instance of the model - your first post, for example, with the title Hello World.
Hussar.ai CMS allows you to edit content in markdown format as well. You can easily add links, images or headings here.
If you want to add a new image, you can use the generation option - for example, an image representing a computer. Once generated, the image can be added to the project and optionally converted to .webp
format for saving space.
After saving, you have a finished instance of the model. You can, of course, create many such posts - each is a separate instance of your model.
CMS also provides SEO support - it generates, for example, JSON-LD (Linked Data) data according to the CreativeWork
type. If the generated code and image URL are correct, just save them so that your entry is better indexed in search engines.
Data modeling in Husar.ai CMS is intuitive and flexible. After creating a model, you can freely add new posts, enrich them with multimedia and use SEO options. This is a solid base for anyone who wants to manage content effectively!
**Check out our other tutorials to learn more about styling fields or automating your work in Husar.ai