In today's digital age, Search Engine Optimization (SEO) is crucial for the success of any website, and the TDK information of the page - that is, the page's Title (title), Description (description), and Keywords (keywords) - is a key factor for search engines to understand the content of the page and determine its ranking.If this information is set correctly, it can not only improve the visibility of the website in search results, but also attract users to click and bring high-quality traffic.
Manually setting TDK for each page is not only time-consuming and labor-intensive, but also easy to miss.Luckyly, AnQiCMS provides us with a flexible and powerful dynamic TDK setting function, allowing us to intelligently configure these important SEO elements according to different page types.Next, let's take a look at how to make full use of these features in AnQiCMS, so that your website can stand out in search engines.
Understanding the TDK setting hierarchy of AnQi CMS
AnQiCMS adopts an intelligent hierarchical management method in TDK settings, which allows us to balance the uniformity of global settings and the personalized needs of specific pages. In short, the priority of TDK information is as follows:
- Page-specific TDK:Independent settings for specific articles, products, or single pages have the highest priority.
- Category/Model TDK:The TDK set for a certain category or content model (such as an article model or product model) will take effect when there is no dedicated TDK under the category or model page.
- Global Default TDK (Home Page TDK):If neither of the above two are set, the system will use the global TDK settings of the home page as a fallback.
Understand this hierarchy, which can help us plan and manage the website's SEO strategy more efficiently.
Set the global TDK default value (home page)
First, let's configure the "front door" of the website - the TDK information of the homepage.This not only provides SEO support for the homepage itself, but also sets a default TDK foundation for the entire website.
Log in to the AnQiCMS backend, navigate to the “Backend settings” menu, find “Home TDK settings”. Here, you can see three input boxes:
- Home title:This is the title displayed in search engine results for the website homepage, as well as the title of the browser tab. It is recommended to include your brand name and core business keywords.
- Homepage keywords: List the most relevant and important core keywords for your website. Please use English commas between multiple keywords.
,Separated. - Home page description:Concisely summarize the main content and services of the website, attracting users to click. This description will be displayed below the search results title.
After filling in this information, remember to click save.
How to call in the template?
In your website template file (usually)base.htmlorindex.htmlof<head>area), AnQiCMS provides a convenienttdktag to dynamically retrieve this information.
Here is an example of a typical call:
<head>
<meta charset="UTF-8">
<title>{% tdk with name="Title" siteName=true sep=" - " %}</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 %}
</head>
It is worth noting here:{% tdk with name="Title" siteName=true sep=" - " %}This piece of code.
siteName=trueIntelligently appends the "Website Name" you configured in the "Global Feature Settings" to the end of the page title, enhancing brand recognition.sep=" - "It defines the separator between the website name and the page title.
After this is set, even if other pages do not have specific TDK, they will inherit the keywords and descriptions of the homepage and add the title with the website name.
Dynamically set the TDK of content pages (articles, products, etc.)
For specific content pages on a website, such as an article or product details, we usually need more accurate TDKs to reflect their uniqueness.AnQiCMS allows us to easily customize this information when publishing content.
When you create or edit articles ("Content Management" -> "Publish document") or products in the background, you will see ".Special SEO field can be found in the expanded part:
- SEO Title:Enter the exclusive title for the current article/product. If left blank, the system will use the 'document title' of the article/product as the page title first.
- Document keywords:Enter keywords closely related to the article/product. Separate multiple keywords with English commas
,Separate. If left blank, the system will automatically extract keywords from the document content or use the global default keywords. - Document summary:Write a concise description for this article/product. If left blank, the system will attempt to automatically extract the first 150 characters from the article/product content as the description.
How to call in the template?
AnQiCMS'tdkThe tag is very intelligent. When it is called in a content detail page, it will automatically detect and prioritize the "SEO title", "document keywords", and "document introduction" you fill in on the content editing page.If these fields are empty, it will automatically fill in information such as the article/product 'document title' and 'document summary' according to preset rules.
Therefore, the calling method in the template can remain consistent with the calling method on the homepage, no additional modification is required:
<head>
<meta charset="UTF-8">
<title>{% tdk with name="Title" siteName=true sep=" - " %}</title>
<meta name="keywords" content="{% tdk with name="Keywords" %}">
<meta name="description" content="{% tdk with name="Description" %}">
</head>
AnQiCMS'tdkThe tag will automatically fetch the most suitable TDK data based on the current page type (article page, product page, or others). This greatly simplifies the development and maintenance of templates.
Dynamically set the TDK of the category page
Category pages (such as "News Center", "Product List") are also important entry points for search engines. AnQiCMS allows you to set TDK independently for each category.
Enter in the background “Content Management" -> "Document Category”, when you select a category to edit, you will find the following SEO fields in “.”
- SEO Title:Customize a unique title for the category page. If left blank, the system will use the "category name" as the page title first.
- Keywords:Enter keywords related to the category topic. Separate multiple keywords with English commas
,If left blank, the system