In today's digital world, search engines are the main way for users to discover website content.To help search engines better 'understand' the content on our website, structured data plays a crucial role.Json-LD (JSON for Linking Data) is a lightweight, easy-to-implement standardized data format that can clearly describe web content in a structured way, thereby enhancing the visibility and display effect of websites in search results.AnQiCMS, as a content management system that focuses on SEO optimization, provides us with a flexible way to configure and display Json-LD, allowing our website content to be more efficiently recognized and indexed by search engines.
Why is JSON-LD important, and how does AnQiCMS empower?
AnQiCMS understands the importance of search engine optimization, and the system is built with a series of advanced SEO tools including pseudo static, TDK (title, description, keywords) management, and Sitemap generation.In terms of structured data, AnQiCMS, with its powerful template engine and dedicated tag support, allows website operators to easily integrate and customize Json-LD.This means we do not need to hard-code static information, but can cleverly utilize the dynamic data generation capabilities of AnQiCMS, automatically packaging the content of the website backend management (such as article titles, publish dates, product images, etc.) into Json-LD format, and presenting it on the web page for search engines to read.
Practical steps to configure JSON-LD in AnQiCMS
To start configuring Json-LD, we first need to clarify its basic structure. Json-LD is a block of code written in JSON format, usually containing in<script type="application/ld+json">Tags can be placed in the HTML document,<head>or<body>AnQiCMS provides a named{% jsonLd %}
The following are the general steps for configuring Json-LD:
定位template file:According to the template design specification of AnQiCMS, the template file is usually located in
/templatedirectory. For the standardized structured data of the entire website (such asOrganization/WebSiteType), you can consider using a public template file (such aspartial/header.htmlor directly in thebase.htmlof<head>Add in the [area]. For specific types of content (such as articles, products, pages) the Json-LD should be configured in the detail page template, for example, the article detail page might bearticle/detail.htmlor{模型table}/detail.html.Use
{% jsonLd %}Tags:In the selected template file, wrap the Json-LD block in AnQiCMS's{% jsonLd %}Tags inside.Write Json-LD code and dynamically fill AnQiCMS data:In
{% jsonLd %}Label inside, you can write Json-LD code that conforms to Schema.org standards.The strength of AnQiCMS lies in its ability to use its rich template tags to dynamically retrieve website data and fill in the corresponding fields of Json-LD.For example, to configure a Json-LD for a blog post, we can do this:
ArticleWe can do this by specifying the type of Json-LD:`twig {% Ld %}