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

Calendar 👁️ 64

In AnQi CMS, Json-LD custom tag call{% jsonLd %}Where should it be placed in the template?

In the era of digital marketing, the importance of Search Engine Optimization (SEO) is self-evident.And structured data, especially Json-LD, is one of the powerful tools to enhance the visibility of websites in search results.AnQi CMS is an efficient system designed for enterprise-level content management and SEO optimization, naturally also providing comprehensive Json-LD support.{% jsonLd %}Where should the custom call tag be placed in the template to achieve its **effect and avoid potential problems, which is often a topic worth discussing.

What is Json-LD and why does AnQi CMS value it?

Json-LD, which stands for JavaScript Object Notation for Linked Data, is a recommended format for embedding structured data directly into HTML pages.It describes page content in a way that is easily understandable by search engines, thereby helping websites to display richer snippets (Rich Snippets) in search results, such as review stars, product prices, event dates, etc., significantly improving click-through rates.

The Anqi CMS was designed with SEO-friendliness in mind, and many of its built-in advanced SEO tools (such as Sitemap generation, Robots.txt configuration, keyword library management, 301 redirection, and pseudo-statics, etc.) are aimed at helping users optimize their website performance.By default, when AnQi CMS enables structured data in the background, it will automatically insert the basic Json-LD structure on the page, which is a good starting point for most websites.

Understand AnQi CMS in depth{% jsonLd %}Tag

However, website content varies greatly, and the default Json-LD structure may not meet all the refined SEO needs. For example, you may need to add more specific Schema attributes for certain types of articles, or define richer product information for product detail pages. At this point,{% jsonLd %}The custom call label is in use.

This tag allows you to declare your own Json-LD content in the template. It is worth noting that AnQi CMS handles these custom contents very intelligently: it willautomatically mergeThe Json-LD you define is different from the Json-LD generated by the system. This means that if the custom field you define conflicts with the default field, your definition will beoverrideThe default value, thus achieving more flexible control. Of course, the前提 is that the Json-LD content you customize must comply with its official grammar specification.

{% jsonLd %}The placement position of the label**

Where should this powerful custom tag be placed in the template? Based on SEO practices and the template mechanism of AnQi CMS, here are our suggestions:

Json-LD is essentially metadata that describes page content, although search engines can parse Json-LD placed in any location of an HTML document (whether it is or not )<head>Or<body>However, the structured data is placed in the HTML document's<head>sectionIt is generally considered to be more standardized and recommended practice.The benefit of doing this is that search engine crawlers can discover and process these important metadata earlier when parsing the page, thereby possibly understanding the page content faster and generating rich media search results.

By combining the Anqi CMS template structure, we can divide the placement strategy into two cases:

  1. Global or General Json-LD (such as “Organization” or “Website” Schema):If your Json-LD is used to describe the entire website or company information, such as your website name, Logo, contact information, etc., this information will appear on every page of the website. In this case, the most ideal placement is yourMaster template file (for examplebash.htmlor the global layout file you define) of<head>inside the tag. Place the code here to ensure that all pages inheriting this master template automatically include these Json-LD data, avoiding the trouble of adding them repeatedly on each subpage.

  2. Page-specific or content-specific Json-LD (such as "Article", "Product", or "Service" Schema):If your Json-LD is optimized for specific types of page content, such as article detail pages (Article Schema), product detail pages (Product Schema), or single pages (WebPage Schema), then it should be placed inDetailed page template file for the content modelIn. For example, for an article detail page, you might be inarchive/detail.htmltemplate file<head>using tags inside{% jsonLd %}Label. This ensures that the Json-LD data is highly relevant to the page content, enhancing the accuracy and effectiveness of structured data.

In any case, make sure your{% jsonLd %}Label wrapping standard<script type="application/ld+json">Label, and write your Json-LD data within it. Here is an example:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>{% tdk with name="Title" siteName=true %}</title>
    <meta name="keywords" content="{% tdk with name="Keywords" %}">
    <meta name="description" content="{% tdk with name="Description" %}">
    {%- tdk canonical with name="CanonicalUrl" %}
    {%- if canonical %}
    <link rel="canonical" href="{{canonical}}" />
    {%- endif %}

    {# 放置Json-LD自定义标签的**位置之一 #}
    {% jsonLd %}
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": "{{ archive.Title }}",
      "image": [
        "{{ archive.Logo }}"
      ],
      "datePublished": "{{ stampToDate(archive.CreatedTime, "2006-01-02T15:04:05+08:00") }}",
      "author": {
        "@type": "Person",
        "name": "安企CMS运营团队"
      },
      "publisher": {
        "@type": "Organization",
        "name": "{% system with name="SiteName" %}",
        "logo": {
          "@type": "ImageObject",
          "url": "{% system with name="SiteLogo" %}"
        }
      }
    }
    </script>
    {% endjsonLd %}

    <!-- 其他CSS、JS等资源 -->
</head>
<body>
    <!-- 页面主体内容 -->
</body>
</html>

In the above example, we utilized the Anqi CMS template provided{{ archive.Title }}/{{ archive.Logo }}/{% system with name="SiteName" %}Variables wait, dynamically fill Json-LD data so that it can adapt to the content needs of different pages.

Summary

Will install the AnQi CMS.{% jsonLd %}Custom tags calling placed in the template.<head>Part is **practical, whether it is global or specific to a content model**bash.html,detail.htmlThis not only conforms to SEO standards, but also ensures that Json-LD data is efficiently parsed by search engines. By flexibly applying this tag, and

Related articles

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

How to skip a specific `Id` page and not display it when looping through a single page `tag-pageList`?

## Masterfully Control Content Display: AnQi CMS `tag-pageList` Skipping Specific Pages As an experienced website operations expert, I am well aware of the importance of the flexibility of the content management system for operational efficiency and user experience.AnQiCMS (AnQiCMS) provides us with powerful content management capabilities with its high-performance architecture based on the Go language.

2025-11-06

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

## Custom Json-LD tags in AnQi CMS: Master the Core Tool for Structured Data Optimization In today's digital marketing environment, Search Engine Optimization (SEO) is no longer just about keyword stuffing, but more about focusing on content quality and the presentation of structured data.AnQiCMS (AnQiCMS) is an enterprise-level content management system developed in Go language, which attaches importance to SEO-friendliness and knows the importance of structured data.

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