How `tdk` tags can dynamically generate and optimize SEO-related Title, Keywords, and Description for each page?

Calendar 👁️ 80

In modern website operations, the importance of Search Engine Optimization (SEO) is self-evident, and the page title (Title), keywords (Keywords), and description (Description), which we commonly refer to as TDK, are the 'business card' of the website content on the Search Engine Results Page (SERP).They not only directly affect the click-through rate of the page, but are also key factors for search engines to understand the content of the page and rank it.AnQiCMS (AnQiCMS) deeply understands the significance of TDK for SEO, and therefore in the system design, it utilizes its powerfultdkThe tag and multi-level management mechanism provides us with a flexible and efficient solution for dynamically generating and optimizing TDK.

How does AnQiCMS intelligently dynamically generate TDK

Of Security CMStdkThe label does not simply extract a single fixed value, but establishes a set of intelligent and prioritized dynamic generation logic.This enables every page to automatically combine the most appropriate TDK information based on its content type (whether it is the homepage, article detail page, category list page, or single page).

The core lies in the system's ability to obtain TDK data from multiple levels:

  • Global SettingsIn the "Homepage TDK settings" on the backend, we can set the default homepage title, keywords, and description for the entire website.This provides a basic SEO direction for all pages.
  • Categorization managementEach content category (such as article category, product category) allows independent setting of its SEO title, keywords, and description during creation and editing.The category introduction will also be automatically used as Description.
  • Content Details: Whether it is an article, product, or single page, we can specify an independent SEO title, keywords, and description for it when publishing or editing.The article summary and single-page summary are also candidates for the Description.
  • Tab pageEven in the management of document tags, you can also set SEO titles, keywords, and descriptions for each tag.

When a user visits a page, Anqi CMS will match and fill in the TDK information according to the current page type and the priority rules set up in advance.For example, if a document is set with an independent SEO title, then that title will take precedence over the SEO title of the category it belongs to, and then over the global settings.This hierarchical priority design ensures fine-grained control and high relevance of TDK.

A meticulous SEO optimization strategy

Utilizing AnQi CMS'stdkTags, we can implement more targeted SEO optimization strategies around these three elements: Title, Keywords, and Description.

1. Strategic Use of Page Title (Title)

The page title is the content that search engines and users first see, it determines whether users click to enter your website. Anqi CMS'stdkLabels provide extremely high flexibility in handling titles:

  • Intelligent stitching: Pass{% tdk with name="Title" siteName=true %}We can choose to automatically append the global name of the website to the page title.For example, the article title "AnQiCMS Function Analysis" can be automatically changed to "AnQiCMS Function Analysis - AnQiCMS Official Website", which helps to strengthen brand awareness.
  • Custom delimiterSeparators such as “-”,“_” etc. can be selected according to the need throughsep(for examplesep="_"Adjust flexibly to match different title styles and search engine display habits.
  • Display of parent category title:showParent=trueThe attribute can be used on specific page types (such as subcategory lists) to automatically include the name of the parent category in the title, creating a longer title with more keywords, thereby enhancing page relevance.
  • CustomizationOn the editing backend of articles, categories, single pages, and other detail pages, you can directly fill in the "SEO Title" field, which can completely cover the system default generated title, allowing you to write the most attractive click-through title for a specific page that includes core keywords.For an article introducing the 'CMS installation steps', you can set its SEO title as 'AnQiCMS Installation Tutorial: Quick Deployment Guide for Beginners | AnQiCMS'.

2. Precise configuration of Keywords (Keywords)

Although the weight of Keywords has decreased, it still provides a reference for the page topic of search engines. The keyword management function of Anqi CMS is powerful:

  • Multi-source inputIn the article, category, tag even the home page background editing interface, we can manually enter keywords, separated by English commas.
  • Keyword library assistantThe system supports keyword library management, which is convenient for unified maintenance and quick selection of frequently used keywords.
  • Avoid cluttering.The correct keyword strategy is to choose keywords that are highly relevant to the page content, few in number, and precise, rather than simply listing them. The backend input box design of Anqi CMS also encourages this norm.

3. Descriptive (Description) captivating

Description does not directly affect ranking, but it is an important factor for users to decide whether to click on the search results page.A good description can effectively increase the click-through rate of the page.

  • Automatically extracted and manually writtenWhen the page has not manually set Description, the system will intelligently extract the abstract from the article introduction, single-page introduction, or category introduction.
  • Customize filling in the backgroundOn the article, category, single-page, and other editing pages, we can fill in the 'description' field specifically.This allows us to describe the page content with more attractive, core keyword-containing, and concise language, prompting users to click.
  • Word count control: Suggest that the Description be kept between 120-150 words, the content summary field of AnQi CMS also usually has a similar word limit, which is convenient for us to write descriptions that meet the requirements.

tdkThe actual application of the tag

In the template file,tdkThe calling method of the tag is concise and powerful. These tags are usually placed on the HTML page,<head>Within the area to ensure the search engine can read it correctly.

<head>
    <meta charset="UTF-8">
    {# 调用页面标题,并附加网站名称后缀,使用默认分隔符 #}
    <title>{% tdk with name="Title" siteName=true %}</title>
    {# 调用页面关键词 #}
    <meta name="keywords" content="{% tdk with name="Keywords" %}">
    {# 调用页面描述 #}
    <meta name="description" content="{% tdk with name="Description" %}">
    {# 可选:调用页面的规范链接 CanonicalUrl,需先判断是否存在 #}
    {%- tdk canonical with name="CanonicalUrl" %}
    {%- if canonical %}
    <link rel="canonical" href="{{canonical}}" />
    {%- endif %}
</head>

This code can dynamically fill its TDK information based on the context of the current page (whether it is the homepage, article details, category list, etc.). For example, when visiting an article titled "AnQiCMS Template Creation Tutorial", if the article is set in the background to have an SEO title of "AnQiCMS Template Development: Quick Start and Practice", and the website name is "AnQiCMS Official Website", then<title>The label may ultimately output "AnQiCMS template development: Quick Start and Practice - AnQiCMS official website", while Keywords and Description will be displayed dynamically based on the article content or manually entered values.

Summary

Of Security CMStdkTags are not just simple placeholders; they represent a complete TDK dynamic generation and optimization system.Through multi-level management mechanisms, flexible customization options, and intelligent priority processing, Anqi CMS helps users achieve fine-grained control over website TDK, effectively enhancing the visibility and attractiveness of the website in search engines, thereby providing a solid foundation for content marketing and SEO optimization.


Frequently Asked Questions (FAQ)

Q1: Why did I set TDK for a specific article, but it still displays the category TDK or global TDK on the page? A1:The TDK generation of AnQi CMS follows a priority rule: article/page setting > category/tag page setting > global website homepage setting.If your specific article is not fully covered (for example, only the Title is set, while Keywords and Description are empty), then Keywords and Description may revert to the settings of their respective category.Please check if the TDK field in the article backend is fully filled out.In addition, clearing the system cache (the background "Update Cache" feature) is also a good habit to ensure that the latest settings take effect.

Q2: BesidestdkOutside the tag, what other features does AnQiCMS have to assist in SEO optimization? A2:AnQiCMS has a variety of advanced SEO tools built-in. For example,Static and 301 Redirect ManagementCan optimize URL structure and handle link changes;Sitemap generationHelps search engines to crawl;Keyword library managementConvenient for TDK and content writing;Anchor text settingCan enhance the weight of internal links;Robots.txt configurationControl the search engine's crawling range; alsoLink pushFunctions that can notify search engines of new content releases in a timely manner. These features combinedtdkTags, together forming a comprehensive SEO optimization solution.

Q3: I do not want the website name suffix to be displayed at the end of Title, how should I set it? A3:Call in the templatetdkwhen labeling, you can modify throughsiteNameThe attribute controls whether to display the website name suffix. For example, if you want not to display the website name in the title of a certain page, you can change the calling method to{% tdk with name="Title" siteName=false %}If you wish to not display on most pages but only on the homepage, then leave the website name setting blank, and manually concatenate the website name in the TDK tags of the homepage template may be more flexible.

Related articles

How to dynamically fetch and display the global settings and contact information of the website using the `system` and `contact` tags?

In AnQi CMS, the global settings and contact information are the basic information that constitutes the important facade of the website.This information must be displayed accurately to visitors, and more importantly, it should be able to be updated and managed flexibly and conveniently without frequent modifications to the template code.AnQi CMS provides these two powerful tags, `system` and `contact`, allowing website operators to easily achieve dynamic acquisition and display of this information.

2025-11-08

How does the `pagination` tag add and control pagination display for document lists to enhance user experience?

When building a website, as the amount of content grows, the document list page becomes long, which not only affects the page loading speed but also makes it difficult for visitors to find the information they need efficiently.At this time, adding pagination to the document list becomes a key factor in improving user experience.AnQiCMS provides a powerful `pagination` tag, combined with the document list tag `archiveList`, it can easily achieve this goal, making your website content display more professional and more user-friendly.

2025-11-08

How to automatically generate and display the `breadcrumb` tag showing the user's current location in the breadcrumb navigation?

During website browsing, you may often see a line of text links at the top of the page or above the content area, like breadcrumbs, indicating your current position in the website and the path to get here.This is what we commonly call 'Breadcrumb Navigation'.It can not only help users quickly understand their hierarchical structure on the website, avoid getting lost, but also improve the usability of the website and play a positive role in search engine optimization (SEO).For AnQiCMS users, implementing such a feature is very simple and efficient

2025-11-08

How to use the `navList` tag to create and display multi-level navigation menus to optimize user browsing?

In website operation, a clear and intuitive navigation system is a key factor in improving user experience, guiding users to explore content, and even optimizing search engine rankings.A well-designed multi-level navigation menu can help visitors quickly find the information they need, reduce the bounce rate, and effectively enhance the in-depth access to website content.In AnqiCMS, the `navList` tag is the core tool to achieve this goal, allowing us to flexibly build and display hierarchical navigation menus to optimize the user's browsing path.### Understand the `navList` tag

2025-11-08

How to use `if` and `for` tags to implement conditional display and loop display of content in AnQiCMS templates?

In the AnQi CMS template world, flexibly controlling the display of content is the key to creating an engaging website.Whether it is to display different information based on specific conditions or to efficiently display a large amount of data, the `if` and `for` tags are indispensable tools for us.AnQiCMS's template engine adopts the syntax of Django, making these operations intuitive and powerful.### Understanding the `if` tag: Implementing conditional display of content The core function of the `if` tag is to decide whether to display a part of the content based on the conditions you set

2025-11-08

How to use the `stampToDate` tag to format timestamps into a friendly date format to display content publication time?

During the operation of the website, the publication time of the content is an important part of conveying information to visitors.A clear and readable date format not only enhances user experience but also makes the website look more professional and timely.In AnQiCMS, the content publish time is usually stored in the form of a series of numbers (i.e., a timestamp).How can we convert these numbers into the familiar 'year-month-day' or 'month/day time:minute' formats that we are accustomed to?AnQiCMS provides us with a very convenient template tag: `stampToDate`.

2025-11-08

How to define temporary variables with the `with` tag in a template to better control content display logic?

When developing website templates in AnQiCMS, we often need to handle various data and decide the display mode of the content according to these data.With the complexity of website functions, the logic in the templates sometimes becomes difficult to understand and maintain.At this point, mastering some advanced template tag usage is particularly important, and the `with` tag is one of the practical tools that can significantly improve the readability and control of the template.### The `with` tag: A tool for defining temporary variables in templates The `with` tag allows us to define temporary variables within a specific area of the template

2025-11-08

How to correctly insert mathematical formulas and flowcharts in a Markdown editor and ensure they display normally on the web?

In content creation, especially in fields involving technology, science, or complex concepts, we often need to insert mathematical formulas or draw flowcharts to assist in explanation.The Markdown editor of AnQiCMS (AnQiCMS) has provided us with great convenience, allowing these complex elements to be input in a concise text form and presented elegantly on the web.How should we operate specifically to ensure that the content is displayed correctly?Firstly, make sure that your safety CMS system has enabled the Markdown editor.

2025-11-08