In website operation, Search Engine Optimization (SEO) is a key link to enhance the visibility of the website.Among them, the page title (Title), keywords (Keywords), and description (Description), collectively known as TDK, play a crucial role.They are not only the primary information that search engines understand page content, but also an important factor in attracting users to click.In AnQiCMS, we can easily achieve the dynamic display of TDK, allowing each page of the website to have relevant and attractive TDK information.

The AnQi CMS has fully considered SEO requirements from the beginning of its design, therefore, it provides a flexible and intelligent TDK management mechanism.The core concept is: by setting default TDK globally on the website and then allowing for personalized settings on more specific page types (such as articles, categories, single pages, tag pages), dynamic adaptation of TDK is achieved.This ensures that even if a page does not have a separate TDK set, there will still be a reasonable default value, while also allowing important pages to have precise TDK optimization.

To implement the dynamic display of TDK, we mainly use a powerful tag from an enterprise CMS template.tdkLabel.This tag is designed to intelligently judge the type of the current page and the configured TDK information, and automatically output the most suitable TDK for the current page.bash.htmlorheader.html) once.tdkLabel, no need to write TDK logic for each page individually, greatly simplifying the maintenance of the template.

Integrated in the templatetdktags

Generally, TDK information is located in the HTML document.<head>Area. Below is what you can add to the template file (for example/template/您的模板目录/partial/header.html) TDK core code:

<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 %}
    {# 其他头部元素,如样式表、Favicon 等 #}
</head>

This code is the basis of dynamic TDK. Let's delve deepertdkHow does the tag intelligently work on different pages.

Home page TDK configuration

For the home page TDK of the website, Anqi CMS provides a dedicated backend setting entry.You can directly fill in the title, keywords, and description of the homepage in the "Home Page TDK Settings" in the background.tdkTags will automatically extract and display this preset home page information.

TDK for article, product detail page

In content management, whether it's publishing articles or products, Safe CMS provides detailed SEO settings for each piece of content.When editing articles or products, you can find fields such as "SEO Title

  • SEO titleIf you enter content here,tdkthe label will be used preferentially as the page<title>. If left blank, it will intelligently backtrack to the title of the article itself.siteName=trueThe parameter will ensure that your website's name is automatically appended after the title, enhancing brand recognition. You can also customize the separator,sepfor example,sep=" | ".
  • Document keywords:Here is the keyword that will be directly used on the page<meta name="keywords">Label.
  • Document Summary:The content of the document summary will be automatically filled into the page<meta name="description">Tags. If not filled in, the system will attempt to automatically extract from the first 150 words of the article.

This hierarchical setting method ensures that each piece of content has highly relevant TDK.

TDK on the category list page

For the classification list page of articles or products, you can set independent TDK for each category in the background "Document Category" management.In the category editing interface, the fields of 'SEO Title', 'Keywords', and 'Category Description' are also provided.

  • SEO titleIf SEO title is set for the category, it will become the title of the category list page. If it is empty, the category name will be used as the title, and the site name can be appended.
  • Keywords:Used for the keyword Meta tag on the category list page.
  • Category Introduction:The description Meta tag content for the category list page.

So, different content classification pages can also have their own exclusive SEO optimization.

Single page TDK

Similar to independent single pages such as "About UsWhen editing a single page in "Page ManagementtdkThe tags will call this information accordingly.

TDK of the tag detail page

The 'Tag' (TDK) setting in the 'AnQi CMS' also supports setting for the website.In the "Document TagstdkThe label will dynamically load the TDK information corresponding to the label.

Application of the standard link (Canonical URL)

In SEO, canonical URLs are used to inform search engines which is the preferred version of the page, to avoid SEO issues caused by duplicate content. Anqi CMS'stdkLabels also support dynamic output specifications. The "standard link" field filled in the article or category settings will be{% tdk with name="CanonicalUrl" %}Label output. It is worth noting that this code is usually wrapped in a conditional judgment to ensure that it only outputs when the page indeed has a standard link, thus avoiding the output of empty tags.

Summary

autoCMS through a unified settdkTags and multi-level backend configuration make the implementation of dynamic TDK extremely simple and efficient.From global defaults to page personalization, and then to intelligent backtracking, every step aims to provide **English** SEO support for the website.This means that website operators can focus more on content creation and overall strategy without spending too much effort on the tedious TDK configuration, thereby allowing the website to perform better in search engines.


Common Questions (FAQ)

1. If I do not set TDK separately on the article or category page, how will autoCMS handle it?

The Anqi CMS has an intelligent rollback mechanism.If the page (such as articles, categories, single pages, tag pages) does not have a separate SEO title, keywords, or description set, the system will automatically retrieve and fill in according to a certain priority.For example, if the SEO title is not set for an article, the article's own title will be used; if no document summary is set, the first 150 characters of the article content will be automatically extracted.最终,如果所有页面级设置都缺失,它还会回溯到您在后台“首页TDK设置”中配置的网站全局默认TDK,确保每个页面都有基本的TDK信息。

2.tdkTagssiteName=trueHow do the parameters work? Can I customize the website name and delimiter?

siteName=trueParameters are mainly used fortdkLabels automatically append your website's name to the page title when displayed on the output page, such as “Page Title - Your Website Name”. This helps to enhance brand visibility.You can set the "Website Name" in the "Global Feature Settings" on the backend.tdkTags provide asepparameters, such as{% tdk with name="Title" siteName=true sep=" | " %}, and you can change the default hyphen (-) to