Creating models in CMS Husar.ai - step by step

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.


1. Start by creating a model

The first step is to name the new model. In our example, we simply call it post.


2. Add the necessary fields to the model

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:

  • title (title of the post)
  • content (content of the post)

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.


3. Save and check the model on sample data

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.


4. Create the first post entry

Create a new instance of the model - your first post, for example, with the title Hello World.

  • Enter the title and content of the post
  • Add different styles, images or even videos (CMS Hussar.ai offers a wide range of editing options)


5. editing in Markdown, generating and adding images

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.


6 Finalization and reuse of the model

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.


7. SEO tab and structured data generation

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.


Summary

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