In today's digital marketing environment, having high-quality content is not enough. How to make search engines better understand and display this content is becoming increasingly important.Structured data, especially JSON-LD, is a powerful tool in our hands, helping our websites present more richly and attractively in search results, which is what we often call "Rich Snippets".

English CMS (EnglishCMS) is an enterprise-level content management system developed with Go language, which provides many built-in functions for SEO optimization.It not only supports pseudo-static, Sitemap generation, Robots.txt configuration, but also allows us to flexibly customize the content model.For structured data, the CMS will generate a basic JSON-LD dataset by default for the page.But often, we may need to control and expand these data more finely according to our business characteristics to achieve more competitive search result display.

Understanding the Core Value of JSON-LD

Before delving into customization, let's first briefly review the core value of JSON-LD.It is a lightweight data format that describes page content in a machine-readable way by embedding a piece of JSON code in HTML.For example, an article can describe its title, author, and publication date; a product can describe its price, inventory, and reviews.When the search engine reads these structured data, it can more accurately understand the content of the page, thereby having the opportunity to display richer visual elements in the search results, such as star ratings, images, price ranges, etc., which can significantly improve the click-through rate.

The reason why Anqi CMS can be the preferred tool for small and medium-sized enterprises and content operation teams is that it maintains high flexibility while providing powerful functions.Its template system is based on Go language, the syntax is similar to Django template engine, and it is very easy to get started.This flexibility extends to the management of structured data, allowing us to implement complex JSON-LD customization through simple template operations.

Integration Points of AnQiCMS with JSON-LD

The company CMS will intelligently handle structured data when the page loads. One of its highlights is that it provides a named{% jsonLd %}English special tag. The function of this tag is very powerful: if you use it in the template and write custom JSON-LD code within this pair of tags, Anqi CMS will not simply overwrite the original default data.Automatic mergeYou define the data and the system generates the default data.This means that if the custom field you define conflicts with the default field, your custom content will be displayed first; if you add new fields that are not present in the default structure, they will be seamlessly added to the final JSON-LD output.

This merging mechanism brings us great convenience: we do not need to build all structured data from scratch, but only focus on the key information that needs to be customized or supplemented.

Practice: Building Custom JSON-LD in AnQiCMS Template

Now, let's go through specific steps and examples to see how to implement custom JSON-LD structured data in the Anqi CMS template.

Step 1: Identify the content type that needs to be optimized

First, think about what types of content on your website need to be better understood by search engines. For example, if you are an e-commerce website,ProductSchema)的结构化数据至关重要;如果你是内容博客或新闻媒体,文章页面(ArticleSchema)则需要重点关注。The 'Flexible Content Model' feature of Anqi CMS perfectly meets your needs for defining various content structures such as 'articles', 'products', and 'events'.

第二步:选择合适的 JSON-LD Schema 类型

After determining the content type, the next step is to choose the most fitting Schema.org type that matches your content description. For example:

  • Article details pageEnglish: Usually usedArticleor its subtypes (NewsArticle,BlogPosting).
  • Product Details Page: UseProductand combine.Offer/AggregateRatingetc.
  • Company Introduction Page: UseOrganizationorLocalBusiness.

The content model of AnQi CMS allows you to define core content types such as “articles” and “products”, and even create more custom models.

Step 3: Use{% jsonLd %}Tag injection of custom data

Assuming we want to implement a more comprehensivearchive/detail.htmlor a custom article template) on the article detail page of the Anqi CMS,Articlestructured data.

  1. Open the corresponding template file:通常,文章详情页的模板可能位于/template/你的模板目录/archive/detail.html。你可以在后台的“模板设计”功能中找到并编辑它。

  2. Insert{% jsonLd %}Tags:在模板文件的<head>or<body>部分(通常推荐在<head>Label's end), insert.{% jsonLd %}Tag pair.

  3. Build JSON-LD content and use AnQiCMS tag dynamic filling:In{% jsonLd %}Internal, write ` that conforms to JSON-LD syntax rules