In website operation, Title (title), Keywords (keywords), and Description (description) - abbreviated as TDK, are core elements of Search Engine Optimization (SEO).They directly affect the display of the website on the search engine results page (SERP), thereby determining the click-through rate and traffic of the website.It is neither realistic nor efficient to manually set TDK for each page of a content-rich website.AnQiCMS as a powerful content management system provides flexible mechanisms to help users dynamically generate and manage these key SEO elements, thus achieving more refined optimization.

The importance of TDK in SEO

Before delving into how AnQiCMS dynamically generates TDK, it is necessary to briefly review the SEO value of TDK.

  • Title (Title)This is the information that users see first in search engines, and it is one of the most important bases for search engines to judge the theme of the page.A well-written title can accurately convey the content of the page, attract user clicks, and include core keywords to help improve relevance ranking.
  • Keywords (Keywords): Although modern search engines have reduced the weight of the Keywords meta tag, it can still be used as auxiliary information to help search engines understand the focus of the page content.What is more important, in AnQiCMS, the "document keywords" field during content management can provide richer SEO information for content models (such as articles, products) and be effectively utilized.
  • Description (Description): The page description meta tag is usually displayed as a snippet in the search engine results page.An attractive description containing keywords that can stimulate user interest and improve click-through rate.

The core value of dynamically generating TDK lies in the fact that it allows each page of the website to have a unique and highly relevant TDK, avoiding duplicate content issues and greatly enhancing the overall SEO performance of the website.

Basic TDK configuration in AnQiCMS

AnQiCMS divides TDK configuration into global settings and fine-grained management at the content level, ensuring comprehensive coverage from macro to micro.

Firstly, for the website'shome page TDKYou can uniformly configure it under 'Home TDK Settings' in the 'Background Settings' on the backend.Here you can set the title, keywords, and description of the homepage, laying the SEO foundation for the entry page of the website.These settings are usually fixed and unchanged, representing the core theme and brand information of the website.

While the dynamic TDK generation of website content mainly depends on AnQiCMSContent modelThe powerful function. Whether it is an article detail page, product detail page, category list page, or tag page and single page, AnQiCMS provides the corresponding fields to allow users to customize the TDK information for each content item.

  • Articles and productsIn the process of adding or editing a document, you will find fields such as 'SEO Title', 'Document Keywords', and 'Document Summary'.Amongst, the "SEO title" allows you to set a special title for this article/product that is used for search engines, distinguishing it from the H1 title displayed on the page.“Document keywords” are used to input keywords highly relevant to the content, while “Document summary” provides the content source for the page Description.If the 'Document Summary' is left blank, the system will usually automatically extract the first 150 characters of the article body as a description.
  • Category PageIn the add or edit interface of the document category, you can also find the fields of 'SEO title', 'keywords', and 'category introduction'.These will be used for the category list page's TDK. When the 'category introduction' is not filled in, the system will use the category name as part of the Title and try to extract the Description from other metadata.
  • Tab page: Similar to the category page, in the addition or editing of 'Document Tags', 'SEO Title', 'Tag Keywords', and 'Tag Description' can help you define TDK for a specific tag page.
  • single page: For independent pages such as "About Us", "Contact Information", and others, you can also independently set "SEO Title", "Keywords", and "Single Page Description" in "Page Management" to ensure that each single page has its own unique TDK.

This hierarchical management method allows website administrators to flexibly set TDK according to the importance and characteristics of the content, thereby maximizing SEO benefits.

Dynamically call TDK in the template:{% tdk %}The art of tags

One of the core charms of AnQiCMS lies in its concise and efficient template tag system. To achieve the dynamic generation and display of TDK,{% tdk %}The tag is your helpful assistant. This versatile TDK tag can intelligently read the corresponding TDK data based on the type of the current page (home page, article page, category page, etc.) and output it.

Generally, you would place these tags in a template file (such asbase.html, which is the common header template of the website) of<head>Within the area.

1. Dynamically generate page title (Title)

Page's<title>Tags are the most important part of SEO. Use{% tdk with name="Title" %}Can get the most appropriate title for the current page. AnQiCMS provides additional parameters to make the title generation more intelligent and flexible:

  • Default call:{% tdk with name="Title" %}This will intelligently retrieve the title of the current page. For example, on an article detail page, it will display the 'SEO title' (if set) or the article title;On the category page, it displays the category name; on the homepage, it displays the title configured in the homepage TDK.
  • Add website name suffix:siteName=trueYou usually want to include the brand name of the website in the title.{% tdk with name="Title" siteName=true %}It will automatically append the website name configured in the "Global Settings" to the page title.
  • Custom delimiter:sep=" - "You can go throughsepThe separator between the page title and the website name can be customized, the default is a hyphen. For example,{% tdk with name="Title" siteName=true sep=" | " %}The separator will be " | ".
  • Display parent category title:showParent=trueIn some category list pages or detail pages, you may want the title to include the name of its parent category to provide more complete hierarchical information.{% tdk with name="Title" showParent=true %}This can meet this need.

A typical Title tag application is as follows:

<title>{% tdk with name="Title" siteName=true sep=" - " %}</title>

This line of code will intelligently output titles such as 'Article Title - Website Name', 'Category Name - Website Name', and so on.

2. Dynamically generate page keywords (Keywords)

Keyword meta tags may not have the weight they used to, but they still provide contextual information.

<meta name="keywords" content="{% tdk with name="Keywords" %}">

This tag dynamically retrieves the "document keywords", "tag keywords", or "category keywords" configured on the current page.If the page does not set a specific keyword, it may be left blank or try to extract it from the content.Suggest filling in the keywords manually in the corresponding content editing interface in the background, and use English commas,Separate it to ensure its accuracy.

3. Dynamically generate page description (Description)

The page description meta tag is the key information to attract users to click, it should be concise and summarize the content of the page.

<meta name="description" content="{% tdk with name="Description" %}">

{% tdk with name="Description" %}Extracts the document summary, category summary, or single-page summary set in the corresponding content items (articles, products, categories, tags, single pages) in the background. If these fields are empty, AnQiCMS will intelligently extract a paragraph of text from the main content of the page as a description, but it is recommended to write manually for SEO purposes