AnQiCMS: Custom JSON-LD structured data, the secret weapon to light up search results
In today's fiercely competitive information ocean, making our website content better understood and displayed by search engines is the key to improving online visibility.Structured data, especially JSON-LD, is playing an important role.It can help search engines accurately interpret page information, and then present it in a richer and more attractive form in search results, which is what we commonly refer to as 'Rich Snippets'.AnQiCMS knows this, not only providing complete SEO tools, but also through the flexible JSON-LD tag customization function, giving us the powerful ability to optimize the display of search results.
Structured data: Let search engines understand your website
Imagine you have published an article about 'How to make delicious pizza'.A regular web page can only tell search engines that your page has the word “pizza”, but with structured data, you can clearly tell search engines: This is a “Recipe” page, its “title” is “How to make delicious pizza”, the author is “XXX”, the release date is “XXXX-XX-XX”, the estimated preparation time is “30 minutes”, and even there are “ratings” given by users, etc.
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 a search engine can better understand your content, it is more likely to display your page in a rich summary form when users search for relevant information, such as with star ratings, images, and production time, which undoubtedly increases user click-through intentions and brings more high-quality traffic to the website.
AnQiCMS built-in support and intelligent generation
AnQiCMS as an enterprise-level content management system, took full consideration of SEO friendliness from the very beginning.It provides built-in basic 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.After publishing content and enabling related features, AnQiCMS will automatically insert a default JSON-LD code into the page, which lays a solid foundation for optimizing the structured data of the website.This automatically generated code usually covers basic information such as page title, description, URL, etc., which is enough 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 finely and individually.For example, a technology review article may need to include specific fields such as 'reviewed object' and 'review score';An e-commerce product page needs more detailed information such as 'SKU', 'stock', 'price range', etc.At this time, the JSON-LD custom tags provided by AnQiCMS are particularly important.
Json-LD tag: the core of custom structured data
AnQiCMS provides a namedjsonLdThe powerful tag, allowing us to fine-tune structured data on the page. Its usage is very intuitive, simply wrap the custom JSON-LD code in the template file where{% jsonLd %}and{% endjsonLd %}The tag pair can be used.
The cleverness of this tag lies in the fact that the content it wraps automatically merges 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 system default value, which gives us great flexibility, allowing us to utilize system automation and also make personalized supplements or adjustments.
Let's look at a practical 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 AnQiCMS template tags, 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' %}To get the cover image of the article. These dynamic contents will be filled into the JSON-LD structure when the page is rendered, ensuring the timeliness and accuracy of the data.At the same time, we also addedwordCountField, further enriching the structured information of the article.
The core advantage lies in:
- Dynamic data integration:We can seamlessly transfer the content of AnQiCMS backend management (such as article titles, summaries, images, custom fields, etc.) through its powerful template tags (such as
archiveDetail/system/categoryDetailEtc.) directly embedded into the JSON-LD code. - Flexible overlay:When we need to define a specific field (such as
Articleofheadlineorimage) more accurately, just in thejsonLdThe label inside overrides the corresponding field, and it will take our definition first. - Support for multiple types:whether it is
Article/Product/Recipe/LocalBusinessIt is any other schema type, as long as it conforms to the JSON-LD syntax standard, we can customize this tag to provide the most matched structured data for different types of content.
Example of practical application scenarios
Optimize the article page (
ArticleSchema):In addition to the basic title, description, you can adddateModified(Modification date),publisher(Publisher information, including Logo),mainEntityOfPage(Specify the page type) and even add custom fields.author.url/commentCountetc., making the article more authoritative and informative in 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.Enhancing local merchant visibility (
LocalBusinessSchema):For websites with physical stores, detailed configuration of merchant name, address, phone number, business hours, Geo coordinates, industry, and other information can be done. Combined with AnQiCMS'scontactTags, easily obtain and fill in this information, allowing merchants to display it in card form in local search results to attract more customers to the store.
Deployment and verification
Using AnQiCMS to customize JSON-LD structured data is very simple. You just need to wrap this JSON-LD code block.{% jsonLd %}...{% endjsonLd %}Label, place it in your AnQiCMS template file.<head>or<body>Inside the tag, it is usually recommended to place in<head>The tag is in a forward position so that the search engine can prioritize the capture.
After deployment, 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 see what rich summary types it can generate.This can help us quickly detect and correct any grammatical errors or logical problems, ensuring that structured data can be effectively recognized and utilized by search engines.
Summary
AnQiCMS with its flexible template engine and powerfuljsonLdCustom tags, providing unprecedented structural 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.Reasonably utilizing this feature will make your website content stand out among a vast sea of search results, presented in a richer and more attractive form to potential users, thereby effectively enhancing the click-through rate, traffic, and overall online influence of the website.
Frequently Asked Questions (FAQ)
1. Why do I still need to customize manually if AnQiCMS has already automatically generated JSON-LD?AnQiCMS's automatic generation feature provides the basic structured data for the website, satisfying