Skip to main content

SEO Management

In Project Zero under the /templates/cms/seo folder, you will see some HTML files to maintain the SEO of your project. You can maintain all SEO on Omnitron.

/seo
├── canonical.html
├── category_seo.html
├── list_seo.html
├── product_seo.html
├── seo_default.html
├── seo_generate.html

Figure 1. The structure of the/templates/cms/seo folder.


canonical.html

In the canonical.html file, you can maintain your canonical URLs. If you already added a canonical URL to Omnitron it automatically takes the URL from Omnitron.


category_seo.html

In the category_seo.html file, you can maintain your category page’s SEO. For example, if you want to add a static meta description to every category page add this code to category_seo.html.

<!-- other SEO section --->

<meta name="description" content="my static description"/>

<!-- other SEO section --->

Figure 2. The static description.

After completing the editing category_seo.html file, you will see all category pages have a static meta description.


list_seo.html

In the list_seo.html file, you can maintain your list page title, description, and other SEO stuff. In Project Zero default page title of the list page is the category name. For example, if you are listing the sneakers category then the list page title becomes “Sneakers”.

Let’s add the company name to the list page title. Change the title in list_seo.html with the code below.

<title>{{ category.name }} | yourCompanyName</title>

Figure 3. Adding compony name to list page.

When you refresh the page you will see the title of the list page become “Sneakers | yourCompanyName”.


product_seo.html

In the product_seo.html file, you will see the four main parts. The default title and description, schema org, twitter card, and open graph data.


default_seo.html

In the default_seo.html file, you will see the default SEO section, and this section can maintain on Omnitron.


seo_generate.html

The seo_generate is a macro to create an SEO section. The seo_generate has two types of usage.

In the first one seo_generate will automatically use the default_seo.html file to create the SEO section if you have SEO in Omnitron. If you don’t have SEO in Omnitron then the SEO section will contain only an empty title.

{% block seo %} {{ seo_generate() }} {% endblock %}

Figure 4. The seo_generate usage 1.

In the second one, the seo_generate function takes the path of the SEO file as a parameter and creates the SEO section.

{% block seo %}
{{ seo_generate('cms/seo/product_seo.html') }}
{% endblock %}

Figure 5. The seo_generate usage 2.