What is the basic syntax structure of custom Json-LD tags in AnQiCMS?

Calendar 👁️ 74

Custom Json-LD tags in AnQi CMS: Master the core tool for optimizing structured data

In today's digital marketing environment, Search Engine Optimization (SEO) is no longer just keyword stuffing, but more focuses on content quality and the presentation of structured data.AnQiCMS (AnQiCMS) is an enterprise-level content management system developed in Go language, which emphasizes SEO-friendly and understands the importance of structured data.It not only provides powerful TDK (Title, Description, Keywords) settings, Sitemap generation, and other advanced SEO tools, but also allows operators to deeply customize the Json-LD structured data of web pages through a flexible template tag system, thereby helping websites stand out in search results and achieve better display effects.

Json-LD (JSON for Linking Data) is a way to embed structured data in web pages using JSON format, which can help search engines better understand page content and possibly display more attractive "rich media summaries" (Rich Snippets), such as articles, products, reviews, and more.For users of the Anqi CMS who pursue the ultimate SEO performance, understanding and mastering the basic syntax structure of custom Json-LD tags is undoubtedly a key step in enhancing website competitiveness.

Management mechanism of Json-LD in AnQi CMS

After enabling the structured data feature in AnQi CMS on the backend, it will automatically generate some basic Json-LD structures for your page, such as for article pages, it may generateArticleorBlogPostingType, could be on the product pageProductType.These built-in structured data can meet most basic needs.However, when facing specific business scenarios, more complex entity relationships, or more refined marketing strategies, we often need to supplement or modify these default data.

The strength of AnQi CMS lies in the fact that it does not completely encapsulate the Json-LD generation logic, but rather provides a special template tag to give operators full customization capabilities.This means that you can inject additional structured data according to actual needs while maintaining the default Json-LD logic, or override the original field definitions to achieve more flexible and personalized Json-LD deployment.

The core syntax structure of the custom Json-LD tag

In AnQiCMS, the basic syntax structure of custom Json-LD tags is concise and intuitive, it adopts a unique block-level tag form, allowing you to embed standard JSON-LD scripts within it. Its core structure is as follows:

{% jsonLd %}
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebSite",
  "name": "您的安企CMS网站名称",
  "url": "https://www.yourdomain.com/"
}
</script>
{% endjsonLd %}

As you can see, the entire custom Json-LD code is enclosed in{% jsonLd %}and{% endjsonLd %}these tags. And within this pair of tags, you need to nest a standard HTML structure,<script type="application/ld+json">Label, and write structured data content that conforms to the JSON-LD syntax within this script tag.

For example, if you want to add a basicWebSiteStructured data of a (website) type, the above example code shows its basic structure.@contextSpecifies the Schema.org vocabulary,@typeDefines entity types,nameandurlThe website's basic information is provided.

Understand the intelligent merging mechanism of AnQiCMS in depth.

It is noteworthy that Anq CMS does not simply replace custom Json-LD data, but rather employs an intelligent 'merge' mechanism. This means that when you use{% jsonLd %}When labeling structured data, AnQiCMS will merge it with the Json-LD data generated by the system by default. The rules for merging follow the following principles:

  1. New Field:If you customize your JSON-LD and it includes fields that are not predefined by the system, these fields will be appended to the final Json-LD output.
  2. Field Override:If your custom JSON-LD contains key-value pairs with the same names as the system default fields, your custom values will take precedence and override the system default values.

This merging mechanism provides you with great flexibility. You don't have to worry about rewriting all the Json-LD content, just focus on the specific parts you want to add or modify.

For example, assuming that AnQi CMS defaults to generating a page for your article that includesheadline(Title) anddatePublished(Publish date) ofArticle(Article) Type Json-LD. If you want to add additional information for this articleauthorauthor information and a customimage(Image) List, and it may be necessary to override the default image, you can write it like this:

{% jsonLd %}
<script type="application/ld+json">
{
  "author": {
    "@type": "Person",
    "name": "AnQiCMS 编辑团队"
  },
  "image": [
    "https://en.anqicms.com/uploads/2023/custom-image-1.jpg",
    "https://en.anqicms.com/uploads/2023/custom-image-2.jpg"
  ]
}
</script>
{% endjsonLd %}

When the page is rendered, the final Json-LD output will contain the system defaultheadlineanddatePublishedand it will also include your customizedauthorobjects andimagearrays. If the system also generates theimagefield, then your customizedimagearray will override the default value.

Points to note in practice

  1. Json-LD syntax verification:JSON-LD has strict requirements for syntax structure, any minor error can cause structured data to be incorrectly parsed by search engines.Before deploying custom Json-LD, it is strongly recommended that you use Google's "Rich Media Search Results Test" tool to verify the correctness and validity of the syntax.

  2. Background feature enabled:Make sure your AnQiCMS backend has enabled the structured data related features.Although custom tags allow you to directly insert Json-LD, the structured data toggle at the system level may affect the final rendering and recognition.

  3. **Template insertion position:

Related articles

The Json-LD custom call tag `{% Ld %}` should be placed at which position in the template?

In AnQi CMS, where should the Json-LD custom call tag `{% Ld %}` be placed in the template?In today's digital marketing era, the importance of Search Engine Optimization (SEO) is self-evident.And structured data, especially Json-LD, is one of the powerful tools to improve the visibility of websites in search results.AnQi CMS is an efficient system designed for enterprise-level content management and SEO optimization, naturally providing comprehensive Json-LD support.

2025-11-06

How to manually enable or disable the Json-LD structured data feature of the AnQiCMS website?

## Unlock AnQiCMS website SEO tool: How to enable and customize Json-LD structured data As an experienced website operation expert, I am well aware that in today's fiercely competitive content ecosystem, it is crucial to know how to make a website stand out in search engines.AnQiCMS (AnQiCMS) provides us with a solid technical foundation with its lightweight, efficient, and SEO-friendly features.Among them, the Json-LD structured data feature is a powerful tool to enhance the visibility and attractiveness of a website.

2025-11-06

How is Json-LD structured data automatically generated in AnQiCMS?

In today's highly competitive online environment, the SEO performance of a website is crucial, and structured data is one of the key technologies to enhance the visibility of a website in search results.As a system dedicated to providing an efficient and easy-to-use content management solution, AnQiCMS deeply understands the importance of structured data in improving website visibility.It not only provides users with convenient content publishing and management tools, but also quietly contributes to the SEO optimization of the website behind the scenes.

2025-11-06

In AnQiCMS template, how to determine if the date format converted by `stampToDate` is correct or valid?

In the vast realm of content management and website operation, every detail concerns the user experience and the accuracy of information transmission.The accurate display of date and time is an indispensable part of it.For operators and developers using AnQiCMS to build websites, how to elegantly handle timestamps in templates and ensure their correct and effective format is a topic worth in-depth discussion.Today, let's talk about the philosophy and practical wisdom of using the `stampToDate` tag in the AnQiCMS template.### Know

2025-11-06

If a custom Json-LD field conflicts with the default field generated by AnQiCMS, which one will be displayed first?

In today's highly competitive online environment, structured data (JSON-LD) has become a key factor for website content to stand out in search engines.It can help search engines better understand the content of the page, thus giving it the opportunity to have richer display effects in the search results, which is what we commonly call 'rich media abstracts'.For a content management system like AnQiCMS (AnQiCMS) that focuses on SEO optimization, the built-in JSON-LD generation function undoubtedly provides great convenience to users.

2025-11-06

How to dynamically fill the `author` and `datePublished` fields in the Json-LD of AnQiCMS article page?

As an experienced website operation expert, I fully understand that in the current context where content marketing and search engine optimization (SEO) are increasingly important, it is crucial to effectively convey the core information of the page content to search engines.AnQiCMS (AnQiCMS) is an enterprise-level content management system developed based on the Go language, which provides us with great convenience with its efficient and customizable features.

2025-11-06

How to add multiple image URLs in Json-LD, such as the thumbnail list of an article?

As an experienced website operation expert, I am more than happy to give you a detailed explanation of how to cleverly integrate the URLs of multiple thumbnails of articles into Json-LD data in AnQiCMS, thereby enhancing the website's search engine performance and user experience. --- ## How to skillfully use AnQiCMS: Efficiently integrate multiple image URLs in Json-LD to enhance the visual appeal and search engine performance of articles In today's increasingly fierce content marketing environment, how to make search engines better understand and display your content is crucial.

2025-11-06

How to integrate the page's SEO title, keywords, and description into Json-LD using the `tdk` tag of AnQiCMS?

In today's highly competitive internet environment, Search Engine Optimization (SEO) is no longer an optional choice, but the foundation of website success.For systems like AnQiCMS, which are specifically designed for enterprise-level content management and SEO optimization, the various tools provided are aimed at helping operators stand out in search results.

2025-11-06