In website operation, the 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 improving the SEO performance of the website.

The universal core of TDK in AnQiCMStdkTag

AnQiCMS has provided us with a namedtdkThe universal template tag, it is the core of handling the TDK of the website page.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 purpose 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 'safety net' mechanism.It usually prioritizes reading the most specific TDK settings on the current page;If the current page is not set, it will trace back to its category or model it belongs to, until it reads the default settings of the entire site, ensuring that every page has appropriate TDK information.

1. Website home page TDK configuration

For the "front door" of the website - the homepage, we need to plan the TDK globally. In the AnQiCMS backend, we can“Backend Settings”->“Home TDK Settings”To configure the title, keywords, and description of the home page uniformly.

In the template file, 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" %}">

BysiteName=trueParameters, we can conveniently append the website name at the end of the title, enhancing brand recognition.

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

When the user browses a specific article or product page, the TDK should accurately reflect the characteristics of the content. AnQiCMS allows us to“Content Management”->“Publish Document”(or Product)At the time, set 'SEO title', 'document keywords', and 'document description' (usually used as a description) separately for each piece of content.

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

In the template of the detail page, you can use the sametdkTag 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 the page title in the title, allowing us to adjust the display effect to our liking.

3. Category and Tag List Page TDK

The category list page and tag list page carry a collection of content sets with specific themes, and their TDK should highlight the thematic nature. In“Content Management”->“Document Classification”or“Document Tags”In it, 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 upper-level page. We still use it in the list page template of categories or tags.tdkCall the tag

<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 category page,showParent=trueParameters can include the name of the parent category in the title, for example, “Electronics - Mobile Category - Some Brand Mobile”, which is very useful for websites with a deep hierarchy structure, as it helps search engines better understand the context of the page.

4. Custom Single Page TDK

For custom single pages such as "About Us", "Contact Us", in"Page Resources" -> "Page Management"In the same way, you can 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)

In addition to TDK, the canonical URL is also an important part of SEO. It is used to inform search engines of the preferred version of a page, avoiding duplicate content issues. AnQiCMS also goes throughtdkThe tag provides a call to the specification link:

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

Here we useifthe statement to judgeCanonicalUrlIf it exists, output it<link rel="canonical">Tag, it is a good practice to avoid outputting empty tags.

Summary

BytdkThis flexible universal tag greatly simplifies the management and display of website TDK.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 road of content marketing and brand promotion.


Frequently Asked Questions (FAQ)

  1. If I don't set TDK for a page in the background, how will AnQiCMS handle it?AnQiCMS has an intelligent "bottom-line" mechanism.If a specific TDK field (such as SEO title) on a page is not filled in, 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 ultimately if all levels do not have it, it will use the global TDK configured in the "home page TDK settings" as the default value.This ensures that each of your pages does not lack TDK information.

  2. Can I hard-code TDK information directly in the template? What are the risks?In theory, you can directly write in the template file<title>...</title>or<meta name="keywords" ...>Tags and hardcoded content are not recommended, 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, thus reducing the weight of the website.AnQiCMS oftdkThe tag is intended to dynamically generate based on page content, which is the practice that conforms to SEO**. Only on a few static pages, and when the content really does not need any dynamic changes, might consider hardcoding, but this is usually achieved through 'single page management' on the backend, rather than directly modifying the template file.

  3. tdklabel'sshowParent=trueWhen is the parameter most useful? showParent=trueThe parameter is very useful when dealing with websites with clear hierarchy structures (such as e-commerce website product categories, large portal article channels)It can combine the title of the current page with the title of the parent category to form a more descriptive complete title.For example, on an electronic product website, 'Mobile Accessories' is a subcategory under the 'Mobile' category. Then, if the title of the 'Mobile Accessories' page is setshowParent=trueThis may be displayed as