In website operation, title (Title), keywords (Keywords), and description (Description), abbreviated as TDK, are indispensable core elements of Search Engine Optimization (SEO).They not only directly affect the display of the website on the search engine results page (SERP), but also determine whether users click to enter your website.AnQiCMS deeply understands the importance of TDK and provides a powerful and flexible mechanism to help us dynamically generate and display TDK tags on different pages, thereby effectively enhancing the SEO performance of the website.

AnQiCMS 中的 TDK 核心:Universaltdktags

AnQiCMS 为我们提供了一个名为tdkThe universal template tag, it is the core for handling the TDK of web pages.No matter which page of the website you are on - homepage, article detail page, category list page, or even a custom single page - this tag can intelligently retrieve and output the most relevant TDK information for the current page.Its design philosophy is to simplify TDK management, allowing website content to automatically present the most matching SEO elements according to the specific context of the page.

Dynamic generation and display: TDK strategies for different pages

The TDK generation logic of AnQiCMS is hierarchical and has an intelligent "bottom-line" mechanism.By default, it will prioritize reading the most specific TDK settings of the current page; if there are no settings on the current page, it will trace back to the category or model it belongs to until the default settings of the entire site are read, ensuring that every page has appropriate TDK information.

1. Website homepage TDK configuration

For the 'front page' of the website - the homepage, we need to make a global planning for its TDK. In the AnQiCMS backend, we can go through“Background Settings”->“Home Page TDK Settings”To configure the title, keywords, and description of the home page.

In the template files, we can call this information like this:

<title>{% tdk with name="Title" siteName=true %}</title>
<meta name="keywords" content="{% tdk with name="Keywords" %}">
<meta name="description" content="{% tdk with name="Description" %}">

PasssiteName=trueParameters, we can conveniently append the website name at the end of the title to enhance brand recognition.

2. TDK of content detail pages such as articles and products.

When users browse specific article or product pages, the TDK should accurately reflect the characteristics of the content. AnQiCMS allows us to“Content Management”->“Publish Documents” (or Product)When, set the 'SEO Title', 'Document Keywords', and 'Document Description' (usually used as a description) for each content item separately.

If these fields are filled in, they will be displayed as the TDK of the current page by preference.If not filled in, the system will intelligently extract information from the article title, content keywords, and article abstract as a substitute.

In the template of the detail page, you can use the sametdkLabels to dynamically display:

<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" %}">

Here,sep="_"The parameter defines the separator between the website name and page title in the title, allowing us to adjust the display effect according to our preference.

3. Classification, Tag List Page's TDK

The classification list page and tag list page carry a collection of content with a specific theme, and their TDK should also highlight the thematic nature.“Content Management”->“Document Classification”or“Document Tag”We can set 'SEO title', 'keywords', and 'category description' or 'tag description' for each category or tag.

Similarly, these settings will take precedence over the TDK display of the global or parent page. In the list page template of categories or tags, we still usetdkthe tag to call:

<title>{% tdk with name="Title" siteName=true showParent=true %}</title>
<meta name="keywords" content="{% tdk with name="Keywords" %}">
<meta name="description" content="{% tdk with name="Description" %}">

It is worth mentioning that on the classification page,showParent=true参数可以让标题中包含父级分类的名称,例如“电子产品 - 手机分类 - 某品牌手机”,这对于层级较深的网站结构非常有用,能让搜索引擎更好地理解页面的上下文。

4. English custom single page TDK

For custom single pages such as "About Us", "Contact Us""Page Resources" > "Page Management"English, you can also set independent "SEO title", "keywords", and "single page introduction".

The calling method should be consistent with the above page, ensuring that each custom single page has accurate TDK information.

Management of standard links (Canonical URL)

TDK,规范链接(Canonical URL)is also an important part of SEO, it is used to tell search engines the preferred version of a page, avoiding duplicate content issues. AnQiCMS also usestdkThe label provides a call to the standard link:

{%- tdk canonical with name="CanonicalUrl" %}
{%- if canonical %}
<link rel="canonical" href="{{canonical}}" />
{%- endif %}

Here we useifstatement to judgeCanonicalUrlIf it exists, only then output<link rel="canonical">The tag, which is a good practice, to avoid outputting empty tags.

Summary

PasstdkThis flexible universal tag greatly simplifies the management and display of website TDK in AnQiCMS.It provides multi-level TDK setting options, from global to page, to intelligent default values, ensuring that every corner of the website has a good SEO foundation.At the same time, the refined title control parameters and support for standard links further enhance the visibility and authority of the website in search engines.Make full use of these features, your website will be able to go further on the path of content marketing and brand promotion.


Common Questions (FAQ)

  1. What will AnQiCMS do if I haven't set the TDK for a page in the background?AnQiCMS has an intelligent "safety net" mechanism.If a specific TDK field (such as SEO title) is not filled in for a page, the system will try to extract information from the main content of the page as a substitute (for example, using the article title as the title, and the article summary as the description).If the page content itself lacks this information, the system will further trace up, trying to use the TDK settings of the category or model page, and finally if there is no TDK setting at all levels, it will use the global TDK setting configured in the "Home Page TDK Settings" as the default value.This ensures that no TDK information is missing from each of your pages.

  2. Can I hardcode the TDK information directly in the template? What are the risks?Theoretically, you can directly write in the template file<title>...</title>or<meta name="keywords" ...>Wait for the tag and hard-coded content.But it is strongly recommended not to do this, especially for dynamically generated pages.Hardcoding will cause all pages to display the same TDK, which is not conducive to SEO and may be considered duplicate content by search engines, thereby reducing the weight of the website.tdk

  3. tdkTagsshowParent=trueWhen are parameters most useful? showParent=trueThe parameter is very useful when processing websites with explicit hierarchy (such as product categories of e-commerce websites, article channels of large portals).It can combine the current page's title with the parent category's title to form a more descriptive complete title.showParent=trueThis may be displayed as