In website operation, Title, Keywords, and Description (abbreviated as TDK) are the foundation of Search Engine Optimization (SEO).They not only describe the page content to search engines but also directly affect the click intention of users on the search results page.AnQiCMS as a content management system focused on, deeply understands the importance of TDK, and therefore provides a powerful and flexible mechanism that allows users to easily dynamically generate and finely manage the TDK of the website.

How to manage TDK in AnQiCMS: A systematic dynamic generation mechanism

AnQiCMS's TDK management starts from the homepage of the website.Under the 'Background Settings' menu in the background, find the 'Home TDK Settings' area, where you will see three input boxes: 'Home Title', 'Home Keywords', and 'Home Description'.Here, you can customize the exclusive TDK information for the homepage of the entire website, establishing an overall SEO tone for the site.

In addition to the homepage, AnQiCMS also provides independent TDK setting options for various content types on the website, which is the core embodiment of its dynamic generation capability.No matter whether it is an article, product, single page, category, or tag, you can find SEO-related fields in their respective editing interfaces.

  • Article and product detail page:When publishing or editing an article/product, in addition to the usual 'document title', 'document content', and 'document introduction', you will also see fields such as 'SEO title', 'document keywords', and so on.Among them, the "SEO title" allows you to set a special title for the current document that is displayed in search engines, which may be different from the H1 title displayed on the page, in order to better meet SEO requirements;“Document keywords” and “document summary” directly correspond to the page's Keywords and Description.If you choose to leave these fields blank, AnQiCMS will not leave the TDK missing, but will intelligently extract content from the 'Document Title' and 'Document Summary' to fill in, ensuring that each page has basic TDK information.
  • Categories and tags page: For the category and tag pages, you can also set the 'SEO title', 'keywords', and 'category/tag description'.This setting ensures that the category list page and the tag aggregation page can also have unique TDK, avoiding the repetition of TDK and thus improving the SEO value of these pages.
  • Single page:Pages like "About Us" and "Contact Us", which are independent single pages, also have exclusive TDK setting entries, including "SEO Title", "Keywords", and "Single Page Description", allowing each independent page to be precisely optimized.

This layered and detailed TDK management mode ensures that each important page of the website can have customized TDK, laying a solid foundation for the website to perform better in search engines.

How to call and display TDK tags in front-end templates

The background TDK information has been set up, the next step is how to correctly display it in the website front-end template. AnQiCMS provides powerfultdkTag. Usually, these TDK tags are placed in the HTML document's<head>area, which is the standard position for search engines to crawl and identify TDK information.

The following is the method to call different TDK information:

  1. Page Title (Title)Page's<title>Tags are one of the most important elements in SEO. In AnQiCMS templates, you can call them in the following way:

    <title>{% tdk with name="Title" %}</title>
    

    This simple tag will automatically retrieve the title of the current page.It will prioritize displaying the "SEO title" you set on the content page (such as articles, categories), if not set, it will追溯 back to a higher level (such as categories, models) until the home page TDK setting.

    Furthermore,tdkThe tag is being calledTitleIt also provided more flexibility:

    • Attach website name:You can use it to automatically add the brand name of the website after the page title,siteName=trueparameters:
      
      <title>{% tdk with name="Title" siteName=true %}</title>
      
    • Custom separator:By default, the website name is separated from the page title with a hyphen. You cansepcustomize the separator parameter, for example using an underscore “_”:“
      
      <title>{% tdk with name="Title" sep="_" siteName=true %}</title>
      
    • Display parent category title:In some deeply nested content pages, you may want to reflect the name of the parent category in the title, in which case you can useshowParent=true:
      
      <title>{% tdk with name="Title" showParent=true siteName=true %}</title>
      
  2. Page Keywords (Keywords)Page Keywords<meta name="keywords" content="...">Labels have decreased in weight in modern SEO, but they are still an important supplement to page information. You can call it like this:

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

    tdkThe tag will automatically aggregate keywords from the current page and its inheritance level.

  3. Page Description (Description)Page Description<meta name="description" content="...">Tags are an important source of search engine result summaries and have a direct impact on user click-through rates. The call method is as follows:

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

    AnQiCMS will intelligently select the description information set for the current page or its upper level for display.

  4. Standard Link (CanonicalUrl)Standard link<link rel="canonical" href="...">It is crucial for avoiding content duplication and specifying the preferred URL. AnQiCMS also provides dynamically generated specification links:

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

    One was used here.ifJudge, ensure that the label is only output when there is a standard link on the page, which is a robust practice.

The key to implementing dynamic TDK: hierarchy and priority

The strength of AnQiCMS's TDK management system lies in its intelligent dynamic generation and hierarchical inheritance mechanism. When you visit a specific page, AnQiCMS will retrieve TDK information in a certain priority order:

  1. Current Page Settings:The system will first check if there is an independent TDK setting for the current page (such as an article detail page, a category list page, a tag page, or a single page).If set, use this information directly.
  2. Inherit from Parent:If the current page is not set with TDK, the system will trace up to find whether the category or model it belongs to has been set.For example, if an article does not have a TDK set, it will try to use the TDK of its category.
  3. Global Default:If after searching through all layers and still no TDK information is found, AnQiCMS will eventually use the global information you configured in the "Home TDK Settings" as the TDK for this page.

This hierarchical inheritance mechanism greatly reduces the burden on content operators.You do not need to manually fill in TDK for each page, just set it at key points, and the system will intelligently fill in the gaps, ensuring that each page of the website has a complete TDK, which ensures flexibility and efficiency at the same time.

Through the above mechanism, AnQiCMS not only makes TDK management simple and efficient, but also provides strong technical support for website SEO optimization through its dynamic generation and intelligent inheritance features.

Frequently Asked Questions (FAQ)

Q1: What will AnQiCMS do if I haven't manually set the TDK for a certain page?A1: AnQiCMS will automatically process according to priority.If the TDK field of a specific content page (such as an article, a single page) is left blank, it will try to inherit the TDK of its parent page (such as the category, model).If the parent page is not set either, it will trace back and use the global TDK information you configured in the background "Home Page TDK Settings".

Q2: Can I set different TDK display formats for different page types (such as article detail pages and category list pages)?A2: Yes, you can. AnQiCMS'tdkThe tag can dynamically obtain the corresponding TDK content according to the page type.For example, the article detail page will automatically obtain the TDK of the article, and the category list page will automatically obtain the TDK of the category.At the same time, calling in the templatetdkWhen labeling, you can also usesiteName/sepandshowParentparameters to<title>customize the display format of labels to achieve finer control.

Q3: In TDK settings, what is the difference between the 'SEO title' and the displayed content on the actual page?<h1>What is the difference between the label content?A3: "SEO title" is a title specifically optimized for search engines, which will display on the page<title>in the tag, and as the search engine results page