How to customize Json-LD structured data to enhance search engines' understanding and display of page content?

Calendar 👁️ 107

In today's highly competitive online environment, it is the goal of every website operator to make their website content stand out, be accurately understood by search engines, and displayed in an attractive manner.Among them, Json-LD structured data plays a crucial role.AnQiCMS (AnQiCMS) is an efficient and customizable content management system that not only provides powerful content publishing and SEO optimization capabilities, but also allows us to highly customize Json-LD structured data, thereby giving our website more advantages in search engine results pages (SERP).

Structured data: The "language" of search engines

Imagine, a search engine is like a 'reader' in the process of learning.When we publish a regular article, it needs to go through a complex algorithm to understand the title, images, text, author, and other information on the page, and this process may have understanding biases.And structured data, especially Json-LD, is like using a 'standard language' to clearly tell search engines: 'This content is about an article, what is the title, who is the author, when was it published, what are the illustrations.'

In this way, search engines can understand our page content more accurately and quickly, which may allow them to display search results in a richer form, such as star ratings, product prices, article thumbnails, event dates, etc., which is what we commonly refer to as "Rich Snippets" and "Featured Snippets".These rich display forms not only improve user click-through rate, but also make our content stand out visually among numerous search results.

AnQi CMS truly understands this, it is developed based on Go language, with a high-performance architecture, flexible content model, and advanced SEO tools, building a unique platform for us.It supports the function of custom content models, allowing us to define different types of content structures such as articles, products, and activities according to business needs;Static URL and 301 redirection management ensures URL optimization;These built-in Sitemap generation, keyword library management, and other tools lay a solid foundation for the effective application of structured data.

How does AnQi CMS handle structured data?

The Anqi CMS enables the structured data feature in the background, and it usually automatically generates some basic Json-LD structured data for our pages.These default generated data can already meet some basic SEO needs, such as identifying the type of page (article, web page, etc.), title, and links, etc.

However, the actual needs of the website are often diverse. For example, you may want to display more detailed inventory information and user reviews on the product detail page, or highlight specific author information and update dates on the article page.Relying solely on default structured data may not fully meet these refined display requirements.

To give us greater freedom, AnQi CMS provides a very practical template tag:{% jsonLd %}This tag allows us to insert a custom Json-LD code block in the template file.The cleverest part is that we do not need to rewrite all structured data, AnQi CMS will intelligently merge the Json-LD we customize with the default data generated by the system.If a field conflict occurs, our custom content takes precedence over the default value, allowing us to accurately adjust specific fields without worrying about destroying the overall structure.

Practice of custom Json-LD structured data

To customize Json-LD, we mainly operate in the template files of the website. Usually, we would choose tobase.htmlFiles define the universal structured data for the entire site, such as corporate information or website navigation; for specific types of content, such as articles or products, there will be corresponding detail page templates (such asarticle/detail.htmlorproduct/detail.htmlMake more specific customization in the。“

Use{% jsonLd %}The syntax of the tag is very direct, just wrap it in。“<script type="application/ld+json">Outside the tag, then write JSON-LD code that conforms to Schema.org standards.

Let's see how to implement it through several common scenarios.

1. Enhance the article page's Json-LD data

Suppose we want to add more detailed author information and standardized publishing/update time to the article page.

In your article detail page template (for examplearticle/detail.htmlyou can use it like this:

{% jsonLd %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "{% archiveDetail with name='Title' %}",
  "image": [
    "{% archiveDetail with name='Logo' %}" {# 如果有多图,archiveDetail Images tag可获取数组 #}
   ],
  "datePublished": "{{ stampToDate(archive.CreatedTime, '2006-01-02T15:04:05-07:00') }}",
  "dateModified": "{{ stampToDate(archive.UpdatedTime, '2006-01-02T15:04:05-07:00') }}",
  "author": {
    "@type": "Person",
    "name": "{% archiveDetail with name='author' %}" {# 假设您在内容模型中自定义了“作者”字段 #}
  },
  "publisher": {
    "@type": "Organization",
    "name": "{% system with name='SiteName' %}",
    "logo": {
      "@type": "ImageObject",
      "url": "{% system with name='SiteLogo' %}"
    }
  },
  "description": "{% archiveDetail with name='Description' %|safe}" {# |safe过滤器确保HTML实体正确显示 #}
}
</script>
{% endjsonLd %}

Here, we make use of the powerful template tags of Anqicms, such as{% archiveDetail %}Dynamically retrieve the title, main image, publication and update time, summary, and custom "author" field of the article.{% system %}Labels help us obtain the website name and Logo as publisher information. It should be noted that the date format should follow the ISO 8601 standard,stampToDateTags can facilitate easy format conversion.

2. Enrich the product page's Json-LD data

For product pages, price, inventory, and customer reviews are information favored by search engines.

On your product detail page template (for example){product/detail.html}, you can customize it like this:

Related articles

How to retrieve and display custom contact information from the background in a template (such as phone, email, WeChat)?

In website operation, clearly displaying contact information is crucial for improving user experience and promoting business communication.Whether it is customer consultation, seeking support, or business cooperation, visitors hope to find and contact you quickly.AnQiCMS provides a convenient and efficient mechanism for you to centrally manage these contact information in the background, and dynamically display them in the website template without frequently modifying the code, which greatly improves the efficiency of website maintenance.### Contact Management in AnQiCMS On AnQiCMS backend

2025-11-08

How to display the current year or a specified format of time in a template, such as "2023-10-26 15:30:00"?

In website operation, it is often necessary to dynamically display the current year or a specific date and time format at different positions on the page, whether it is used for the copyright statement in the footer, the publication update time of articles, or the time points of various events.AnQiCMS (AnQiCMS) provides flexible and powerful template tags, allowing you to easily meet these needs.

2025-11-08

How to call the embedded method of Go structure in AnQiCMS template to get and display data?

AnQiCMS with its efficient architecture based on the Go language and flexible template system, provides strong support for website content display.For users who want to implement more intelligent and dynamic content display in templates, it is particularly important to understand how to call the built-in methods of Go structures in AnQiCMS templates.This can make your template more tidy, and it can encapsulate complex logic processing on the backend, allowing the frontend to focus more on visual presentation.

2025-11-08

How to integrate image captcha functionality into the comment or message form to improve security?

When a website's comment section or message board is flooded with spam, the captcha is undoubtedly a simple and effective defense measure.It can effectively identify whether it is a human user or an automated program, thereby preventing malicious screen scraping or spam comments.AnQi CMS understands the importance of website security, therefore it has integrated the graphic captcha function into the system, allowing us to easily add this layer of protection to the form and enhance the overall security of the website.

2025-11-08

How to display user group details, user avatar, username, and other personal information in the template?

In website operations, providing users with personalized experiences, enhancing community interaction, and clearly showcasing the rights and interests of different user groups is the key to improving user stickiness and website value.AnQiCMS as a powerful content management system, provides flexible template tags, allowing us to easily display users' personal information (such as username, avatar) and details of their user group on the front-end page.

2025-11-08

How to customize the overall layout and display structure of the website front-end page in AnQi CMS?

## Flexible Mastery: How Anqi CMS Creates Personalized Website Front-end Layout and Display Structure In the digital age, the front-end design of a website is crucial for user experience and brand image.An efficient content management system that not only can easily manage content but also can flexibly customize the overall layout and display structure of the front-end page.AnQi CMS is well-versed in this, providing us with a powerful and intuitive toolkit that makes website customization accessible.

2025-11-08

How to set a dedicated display template for articles, products, or single pages in AnQi CMS?

In Anqi CMS, in order to make your website content more personalized and visually appealing, you can set exclusive display templates for different types of articles, product detail pages, or independent single pages.This can not only improve the user experience, but also facilitate differentiated operation for specific content.The Anqi CMS provides a flexible mechanism to achieve this goal, whether it is for all content under a specific category, a specific article or product, or an independent page, you can find a suitable template customization solution.

2025-11-08

What types of template display modes does AnQi CMS support (such as adaptive, code adaptation)?

How to ensure that the content is perfectly displayed on different devices when building a website is a problem that every operator needs to consider.A safe CMS knows this, therefore it provides various flexible template display modes to help us choose the most suitable website presentation method according to our actual needs. The template display mode of AnQi CMS mainly includes three types: adaptive, code adaptation, and independent PC + mobile site.Understand their respective features and application scenarios, which can help you better plan the user experience and SEO strategy of the website.

2025-11-08