As an experienced security CMS website operator, I know the power of content in the digital world.High-quality content is the foundation for attracting and retaining users, and how to make this content better understood and displayed by search engines is one of the core issues for our operations staff.Today, I want to delve deeply into the Anqi CMS Json-LD custom call tag, and how it has become a powerful tool for us to enhance the structured data display of our web pages.

Understanding the importance of structured data and Json-LD

Today, with the increasing sophistication of digital marketing, every page and article we create carries specific information.Relying solely on traditional SEO optimization, such as keyword layout and high-quality backlinks, is no longer enough to stand out in the highly competitive search results.Search engines are becoming more "smart", longing to understand the meaning and entity relationships of our web content more directly and clearly.This is where structured data comes into play.

Structured data is a standardized format for providing explicit information about the content of a page to search engines.It helps search engines better understand web content, which may be displayed in search results as rich media summaries (Rich Snippets), such as the publication date, author, rating, product price, inventory, and so on.This enhanced display format not only significantly increases our content's click-through rate (CTR), but also provides more value before the user clicks and establishes an initial sense of trust.

Json-LD (JavaScript Object Notation for Linked Data) is the structured data format recommended by mainstream search engines like Google.It is embedded in the HTML page as a JSON code block, clearly describing the entities and their properties on the page without interfering with the original rendering and layout.AnQi CMS knows this, and therefore provides powerful functions to support the implementation of Json-LD.

Support for structured data of AnQi CMS

The Anqi CMS fully considered SEO-friendliness from the beginning of its design.It includes advanced SEO tools such as Sitemap generation, TDK configuration, and pseudo-static rules, laying a solid foundation for the search engine optimization of website content.On this basis, Anqi CMS also provides the default generation function for structured data.After the background enables the structured data feature, the system will automatically insert a basic Json-LD code block into the page, helping search engines identify the basic types of the page (such as article pages) and core information.

However, for operators who pursue extreme optimization, the default generated structured data may not fully meet all business scenario requirements.For example, a product introduction page may require more detailed product properties (SKU, brand, reviews), and an event page may require detailed event time, location, and participation methods.This is when the Json-LD custom tag of AnQi CMS has become our tool for refined control of structured data.

Master the Json-LD custom call tag: the starting point of fine control

Provided by AnQi CMS{% jsonLd %} ... {% endjsonLd %}Labels, giving us the flexibility to go beyond the default settings.This tag allows us to define or modify the Json-LD data output on the page directly.The principle of its operation is very clever: the Json-LD code written inside this tag will be merged with the structured data generated by the default Anqi CMS system.If the custom field conflicts with the default field, the custom field will take precedence over the default field to ensure we can fully control the final structured data output.

Enhancing the core advantages of structured data display on the page

By{% jsonLd %}By customizing call tags, we can achieve significant enhancement of structured data display, and its core advantages are reflected in the following aspects:

First, it isUnmatched flexibility and accuracy.Each page is unique, and the core information it aims to convey to search engines is also different.Custom tags allow us to break free from generic templates and tailor the Schema types and properties to best fit the content semantics of each page.{% archiveDetail %}Tag to get data, and then fill it into the customizedProductIn the schema, this directly displays the key information of the product in the search results, greatly enhancing the user's purchase intention.

Secondly, it caneffectively enhance the search engine's understanding of the content..When search engines crawl and index web pages, Json-LD provides a detailed 'map' that guides them to understand entities, properties, and their relationships on the page.By customizing the Schema, we can more accurately tell the search engine what this content is about and where its core value lies.This precise semantic expression helps search engines match user queries more accurately, thus presenting our content to the most relevant audience.

Again, it isPromote the display of rich media summaries, greatly improve click-through rate.This is the most direct and most attractive benefit.When our content is presented in the form of rich media summaries (such as star ratings, images, prices, and release dates) in search results, it will be more prominent and attractive than ordinary links.This visual advantage can significantly increase the likelihood that users will click on our page, even if it is not ranked first, and may also attract more traffic due to rich media summaries.

Finally, itStrengthened the control of content creators and operatorsAs operation personnel, we have the deepest understanding of content value and target audience.{% jsonLd %}Label empowers us, directly transform this understanding into language that search engines can understand.We can quickly adjust and optimize structured data based on market feedback and changes in SEO strategy, achieving fine-grained operation of search results display and ensuring that every bit of content effort is maximized in return.

Actual operation and template example

Assuming we have a product detail page, we want to display the product name, image, price, and brand in the search results. The product model of AnQi CMS may already contain this data, and we can use it by{% archiveDetail %}tags to obtain.

{# 假设我们正在一个产品详情页,并已获取当前产品的详细信息 #}
{% archiveDetail productTitle with name="Title" %}
{% archiveDetail productDescription with name="Description" %}
{% archiveDetail productLogo with name="Logo" %}
{% archiveDetail productPrice with name="Price" %}
{% archiveDetail productBrand with name="Brand" %} {# 假设“Brand”是产品模型的自定义字段 #}

{% jsonLd %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "{{ productTitle }}",
  "image": "{{ productLogo }}",
  "description": "{{ productDescription }}",
  "brand": {
    "@type": "Brand",
    "name": "{{ productBrand }}"
  },
  "offers": {
    "@type": "Offer",
    "priceCurrency": "USD", {# 假设货币是美元,可根据实际情况调整 #}
    "price": "{{ productPrice }}",
    "itemCondition": "https://schema.org/NewCondition",
    "availability": "https://schema.org/InStock" {# 假设产品有库存 #}
  }
}
</script>
{% endjsonLd %}

This example demonstrates how to use the variables existing in the Anqi CMS template (via{% archiveDetail %}obtained"), and dynamically fill them into the customizedProductIn the Schema. This way, even if the default Json-LD of Anqi CMS does not have detailed output for product types, we can easily achieve it through custom tags.

If we need to override the default generated author information, or add specific comment quantity information to the article, we can do this too:

{# 假设文章ID为archive.Id,评论数量通过archiveDetail获取 #}
{% archiveDetail archiveCommentCount with name="CommentCount" %}

{% jsonLd %}
<script type="application/ld+json">
{
  "author": {
    "@type": "Person",
    "name": "安企CMS运营团队" {# 覆盖默认作者信息 #}
  },
  "commentCount": "{{ archiveCommentCount }}" {# 添加评论数量 #}
}
</script>
{% endjsonLd %}

Points to note in practice

While using{% jsonLd %}When customizing tag calls, there are several key points we need to remember:

first, The correctness of Json-LD syntax is crucial.Any small syntactic error can cause structured data to be invalid, and search engines will not be able to parse it correctly.When writing or modifying Json-LD code, be sure to check the JSON format carefully and ensure that the property names and types defined by Schema.org are accurate and correct.

secondly,Make full use of existing CMS data.AnQi CMS provides rich tags to obtain articles, products, categories, system settings, and other information.When building Json-LD, it is best to dynamically call this data as much as possible rather than hardcoding it.{{ system.SiteName }}To obtain the website name, use{{ archive.Title }}Get the article title, which ensures that structured data is consistent with page content and reduces manual maintenance work.

Finally,Use the validation tool for testing..Before the page is published and launched, or after any changes are made to the template, it is strongly recommended to use Google's "Rich Media Search Results Test" tool (Rich Results Test) to verify that the Json-LD on our page is valid, whether there are any warnings or errors, and whether it can generate a rich media summary preview.This can help us quickly identify and correct problems, ensuring that structured data works as expected.

Summary


Frequently Asked Questions (FAQ)

Question 1: If I customize Json-LD, will the structured data generated by Anqi CMS by default still exist? Will there be any conflicts?

Answer: Anqi CMS'{% jsonLd %}The custom tag is designed to merge with the Json-LD data generated by the system. This means that if you customize a field (for exampleauthor), it will override the default generatedauthorfield.And you do not have a custom field, the system will still output the default generated Json-LD data.So, as long as you follow the Json-LD syntax specifications, there usually will not be any conflicts, but will merge or override according to your settings.

How do I know if my custom Json-LD is valid or if it will display as rich media summary?

Answer: You can use the 'Rich Media Search Results Test' tool provided by Google (Google Rich Results Test).Enter the URL of your page or paste the Json-LD code, and the tool will analyze your structured data, point out any errors or warnings, and display the rich media summary that your page may appear in search results.

Question 3: Will custom Json-LD affect the page loading speed of the website?

Answer: Json-LD code is typically used toscriptLabels embedded in HTML and have relatively less code.In most cases, correctly written and embedded Json-LD has a negligible impact on page loading speed, almost negligible.The SEO and user experience benefits it brings far outweigh the minor impact it may have on performance.