AnQiCMS: Custom JSON-LD structured data, the secret weapon to light up search results

In today's fiercely competitive information ocean, ensuring that our website content is better understood and displayed by search engines is the key to improving online visibility.Structured data, especially JSON-LD, is playing this important role.It can help search engines accurately interpret page information, and then present it in a more rich and attractive form in search results, which is what we commonly refer to as 'Rich Snippets'.AnQiCMS knows this, not only providing perfect SEO tools, but also enabling us to have strong abilities to optimize search results display through flexible JSON-LD tag customization.

Structured data: Let search engines understand your website

Imagine that you published an article about 'How to make delicious pizza'.普通网页只能让搜索引擎知道你的页面有“披萨”这个词,但有了结构化数据,你就可以清晰地告诉搜索引擎:这是一个“菜谱”(Recipe)页面,它的“标题”是“如何制作美味披萨”,作者是“XXX”,发布日期是“XXXX-XX-XX”,预计制作时间是“30分钟”,甚至还有用户给出的“评分”等等。

This additional, structured information is like a clear manual, allowing search engines to quickly and accurately understand the specific meaning of the page content.When the search engine can better understand your content, it is more likely to display your page in the form of rich snippets when users search for related information, such as star ratings, images, production time, etc. This will undoubtedly greatly increase the willingness of users to click, bringing more high-quality traffic to the website.

English support and intelligent generation built into AnQiCMS

AnQiCMS as an enterprise-level content management system has fully considered SEO friendliness from the beginning of its design.It provides built-in JSON-LD structured data generation mechanisms for common page types such as article detail pages, product detail pages, category list pages, and even single pages.When we publish content and enable related features, AnQiCMS will automatically insert a default JSON-LD code into the page, laying a solid foundation for the optimization of the structured data of the website.This automatically generated code typically covers page title, description, URL, and other basic information, which is sufficient to meet most basic needs.

However, the uniqueness of website content and the diversity of business needs often require us to customize structured data more meticulously and individually.For example, a technology review article may need to include specific fields such as "reviewed objectThis is where the JSON-LD custom tags provided by AnQiCMS become particularly important.

Json-LD tag: the core of customized structured data

AnQiCMS provides a namedjsonLdThe powerful tag, allowing us to finely control structured data on the page. Its usage is very intuitive, simply wrap the custom JSON-LD code in the template file where needed.{% jsonLd %}and{% endjsonLd %}Tags between.

The cleverness of this label lies in the fact that the content it wraps will automatically be intelligently merged with the structured data generated by the system by default.If there is a field with the same name, our custom content will override the default system value, which gives us great flexibility, allowing us to utilize system automation while also making personalized补充 or adjustments.

Let's look at a real example. Suppose AnQiCMS automatically generates the basic JSON-LD for an article, but we want to add more specific author information and a list of featured images:

{% jsonLd %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "author": {
    "@type": "Person",
    "name": "{% archiveDetail with name='author' %}", {# 假设文章模型有一个自定义字段叫author #}
    "url": "{% system with name='BaseUrl' %}/about-us.html" {# 链接到关于我们页面 #}
  },
  "image": [
    "{% archiveDetail with name='Logo' %}", {# 获取文章主图 #}
    "https://www.yourdomain.com/static/images/default-thumbnail.jpg" {# 添加一个默认图作为补充 #}
  ],
  "wordCount": "{% archiveDetail with name='wordCount' %}" {# 假设文章模型有字数字段 #}
}
</script>
{% endjsonLd %}

In the above example, we use the template tags of AnQiCMS, such as{% archiveDetail with name='author' %}to dynamically obtain the custom author information of the article,{% system with name='BaseUrl' %}to obtain the basic URL of the website, as well as{% archiveDetail with name='Logo' %}Get the cover image of the article.This dynamic content will be filled into the JSON-LD structure when the page is rendered, ensuring the timeliness and accuracy of the data.wordCountField, further enriching the structured information of the article.

The core advantage lies in:

  1. Dynamic data integration:We can seamlessly integrate the content of AnQiCMS backend management (such as article titles, summaries, images, custom fields, etc.) through its powerful template tags (such asarchiveDetail/system/categoryDetail等)directly embedded into the JSON-LD code.
  2. Flexible overlay:When we need to define a specific field more accurately (such asArticleofheadlineorimage),just injsonLdLabel rewrite the corresponding field internally, and it will prioritize our definition.
  3. Support for multiple types:WhetherArticle/Product/Recipe/LocalBusinessAny other Schema type, as long as it conforms to the JSON-LD syntax standards, we can customize this tag to provide the most matching structured data for different types of content.

Example of practical application scenarios

  • Optimize article page(ArticleSchema):In addition to the basic title, description, you can adddateModified(Modified date),publisher(Publisher information, including Logo),mainEntityOfPage(明确页面类型),even through custom fields.author.url/commentCountLet the article be more authoritative and informative in the search results.

  • Enrich the product page (ProductSchema):In addition to the product name, image, and description, you can further refineoffers(such as price, currency, stock status, whether there is a discount),aggregateRating(average rating and number of comments) as well asbrandInformation. If the product has multiple variants, it can also be described byitemCondition/colorsuch attributes to help users quickly understand the key features of the product in search results.

  • Enhance the visibility of local businesses (LocalBusinessSchema):For websites with physical stores, detailed configuration of merchant name, address, phone, business hours, Geo coordinates, and industry can be done. Combined with AnQiCMS,contactLabels can be easily retrieved and filled in to allow merchants to display their information in card form in local search results, attracting more customers to visit in person.

Deployment and Verification

Using AnQiCMS custom JSON-LD structured data is very simple. You just need to wrap this JSON-LD code block.{% jsonLd %}...{% endjsonLd %}Label, placed in your AnQiCMS template file.<head>or<body>Inside the label, it is usually recommended to place in.<head>The label in the front position, so that search engines can prioritize crawling.

After deployment is completed, be sure to use the one provided by GoogleRich text result test toolorSchema.org validatorVerify your JSON-LD code to ensure it is correct and check what rich summary types it can generate.This can help us detect and correct any grammatical errors or logical issues in time, ensuring that structured data can be effectively identified and utilized by search engines.

Summary

AnQiCMS through its flexible template engine and powerfuljsonLdCustom tags, providing unprecedented structured data optimization capabilities for website content operators.It not only makes it possible to automatically generate structured data, but also gives us the freedom to deeply customize JSON-LD according to specific business needs.合理运用这一功能,将使您的网站内容在海量的搜索结果中脱颖而出,以更丰富、更具吸引力的形式呈现在潜在用户面前,从而有效提升网站的点击率、流量和整体在线影响力。


Common Questions (FAQ)

1. Why do I still need to manually customize it if AnQiCMS has already automatically generated JSON-LD?AnQiCMS's automatic generation feature provides the basic structured data for the website, meeting