As a senior website operation expert, I fully understand the vital role of structured data (Structured Data) in modern search engine optimization (SEO).It is like the 'resume' of your website content, directly telling search engines what your page is about and what key information it contains.@typeThe correct setting of properties is also the core to ensure that search engines can accurately understand the content of your page. Today, let's delve into how to efficiently and accurately configure Json-LD for different page types in AnQiCMS.@typeproperties.

Ensure the security of CMS different pages Json-LD@typePractical guide to correct settings

In the vast sea of information on the internet, search engines have to process massive amounts of information every day.To better understand and present web content, they require us to provide clear and standardized "prompts.Json-LD is such a hint mechanism, which can present the key information of a page in a structured way to search engines, thereby possibly obtaining richer search results display (Rich Snippets), such as the publication date of articles, product prices and reviews, event locations and times, etc., all of which can greatly enhance the click-through rate and user experience of the website.

The core of Json-LD lies in@typeProperty.This property is like putting an accurate 'label' on your page content, telling search engines what type of entity this page represents.Is this a news article?Is this product information?Is it about our introduction page?@typeGuide the search engine to interpret and index your content in a different way. Incorrect.@typeThe settings may not only invalidate your structured data, but may also mislead search engines, affecting the SEO performance of your website.


How can Anqi CMS help with structured data deployment?

At the design stage, AnQi CMS fully considered the needs of SEO and provided a series of advanced SEO tools and flexible content management features, including support for Json-LD.AnQiCMS through its powerful template engine allows you to easily manage structured data while maintaining flexibility and customizability.

Here,{% jsonLd %}This unique template tag plays a key role.It allows you to customize Json-LD code on the page and intelligently merge it with the structured data generated by the system by default.This means that you can keep the basic information automatically filled in by the system, and supplement or override specific fields according to specific needs.@typeSet the flexibility of this label when setting it will be our reliable assistant.


Second, set for different page types@typePractical strategy

The "Flexible Content Model" feature of AnQi CMS allows us to define various content types such as articles, products, single pages, etc. Based on these content models and page types, we can accurately set Json-LD's@type.

1. Article Details Page (e.g., blog post, press release)

For various types of content published under the "Article Model", such as blog posts, press releases, technical tutorials, etc., the most common@typeChoose YesArticleor more specificallyBlogPosting/NewsArticle.

  • [en] Recommended@type: Article,BlogPosting,NewsArticle

  • How to set:The template file corresponding to the article detail page (usually{模型table}/detail.html), you can use{% jsonLd %}tag to define or modify Json-LD. Safe CMS'sarchiveDetailLabels (tag-/anqiapi-archive/142.htmlEnglish can conveniently obtain various detailed information of the current article.

    {% jsonLd %}
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "BlogPosting", {# 明确指定为博客文章类型 #}
      "headline": "{{archive.Title}}", {# 使用文档标题 #}
      "image": "{{archive.Logo}}", {# 使用文档封面图 #}
      "datePublished": "{{stampToDate(archive.CreatedTime, "2006-01-02T15:04:05Z07:00")}}", {# 发布时间 #}
      "dateModified": "{{stampToDate(archive.UpdatedTime, "2006-01-02T15:04:05Z07:00")}}", {# 修改时间 #}
      "author": {
        "@type": "Person",
        "name": "{% system with name='SiteName' %}" {# 作者可以是网站名称或具体人名 #}
      },
      "publisher": {
        "@type": "Organization",
        "name": "{% system with name='SiteName' %}",
        "logo": {
          "@type": "ImageObject",
          "url": "{% system with name='SiteLogo' %}"
        }
      },
      "description": "{{archive.Description}}" {# 文档描述 #}
    }
    </script>
    {% endjsonLd %}
    

    Here we utilize{{archive.Title}}/{{archive.Logo}}and variables are dynamically filled with article data usingstampToDateThe filter formats timestamps to ISO 8601 standard format, which is a common requirement for date fields in Json-LD.

2. Product details page

If your page displays specific products or services, for example, the content under 'Product Model', thenProductThe type is your best choice. It can contain rich information such as price, inventory, brand, and reviews.

  • [en] Recommended@type: Product

  • How to set:Similarly, in the product details page template,archiveDetailLabel fetches product data. The "Content Model Custom Field" feature of AnQi CMShelp-content-module.md)Allow you to add specific fields such as "brandarchiveParamsLabels (tag-/anqiapi-archive/146.html)Obtain and fill in Json-LD.

    `twig {% Ld %}