The importance of TDK: More than just a string of words

Firstly, let's briefly review the importance of TDK.Title is a concise summary of the page content, directly displayed in the search results title bar, and is the information that users see first.Keywords help search engines understand the core theme of the page, although their weight has decreased, proper settings still have a辅助作用.Description provides a more detailed page summary, usually appearing as the description text of search results, and is a key lure to attract users to click.They collaborate to build an initial understanding of page content for search engines and users.

The dynamic TDK mechanism of Anqi CMS: Flexible and powerful

The reason why Anqi CMS emphasizes dynamic TDK is that it allows us to flexibly configure these SEO elements according to different page types and content characteristics, rather than a one-size-fits-all approach.This means that, whether it's the homepage, detailed article page, product display page, category list page, or a custom single page, we can tailor-made exclusive TDK information for them, greatly enhancing the precision of SEO.

The implementation of this 'dynamic' mainly manifests in two aspects:

  1. English translation: Multi-level, multi-dimensional content management backend TDK configuration entry:Anqi CMS has reserved TDK setting fields in all content management modules of the website.
  2. Template unified TDK tag call mechanism:Regardless of where the background data source comes from, the front-end template uses a simpletdktag to dynamically retrieve and display this information.

Next, let's take a specific look at how to set TDK in the AnQi CMS backend and how to call it in the front-end template.

Set TDK in the AnQi CMS backend: Customize 'business card' for each page

The backend of AnQi CMS provides a very intuitive and detailed TDK setting entry, ensuring that each page can have the most suitable SEO information.

  • Website homepage TDK configuration:

  • Content Details Page (article, product, single page) TDK settings:For each article, product, or single page published, Anqi CMS allows you to perform independent TDK optimization.When publishing or editing this content, you will see a collapsed area labeled 'Other Parameters' or similar, which includes 'SEO Title', 'Keywords', and 'Document Summary' (or 'Single Page Summary').

    • “SEO Title”: this field will be used directly as the page's title<title>Label content, if you do not fill in, the system will usually use the article title as the default value.
    • “Keyword”:Enter keywords highly relevant to the current content, separated by English commas,This helps search engines better understand the page topic.
    • “Document Summary”:This is not only a summary of the page content, but also of the page<meta name="description">The source of the label. Write a captivating description containing core keywords, which can effectively improve the user click-through rate.
  • TDK settings for category list page and label page:The category and tag page is also an important entry for users and search engines to understand the structure of the website.Under "Content Management" and "Document Category" or "Document TagThese settings will take effect on the corresponding category list page or tag aggregation page.

This multi-level setting logic of AnQi CMS allows the page TDK to be optimized more accurately according to the specific attributes of the content.If a detail page has not set the TDK, the system will usually trace up, using the TDK of its category. If the category has not set it either, it may use the TDK of the website homepage. This intelligent inheritance mechanism greatly simplifies daily operation work.

In the front-end template, dynamically call TDK: one line of code, universal adaptation

Anqi CMS provides an extremely convenienttdkTags, allowing you to dynamically obtain and display the current page's TDK information in website templates without writing complex logical judgments.This tag automatically identifies the type of the current page (whether it is the homepage, article page, category page, or others) and fetches TDK data from the corresponding configuration on the backend.

Generally, these tags are placed in the website template's<head>area (for examplebase.htmlorheader.html),to ensure that all pages can be loaded correctly.

<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" %}">

    {# 动态设置Canonical URL,如果有的话 #}
    {%- tdk canonical with name="CanonicalUrl" %}
    {%- if canonical %}
    <link rel="canonical" href="{{canonical}}" />
    {%- endif %}

    <!-- 其他头部元素 -->
</head>

Let's delve into the details of:tdkUsage and parameters of the tag:

  • Get the page title (name="Title"): {% tdk with name="Title" %}:This is the basic usage, it will get the most matching SEO title of the current page.{% tdk with name="Title" siteName=true %}:If you want to automatically add the website name at the end of the page title, you can setsiteName=true.{% tdk with name="Title" siteName=true sep="_" %}:sepThe parameter allows you to customize the separator between the title and the website name, for example, setting it to an underscore_.{% tdk with name="Title" showParent=true %}In the category or article detail page, if you want the title to include the name of the parent category, you can useshowParent=true.

  • Get the page keywords (name="Keywords"): {% tdk with name="Keywords" %}This tag will directly output the keyword string configured on the backend of the current page.

  • Get page description (name="Description"): {% tdk with name="Description" %}This tag will output the description content configured on the backend of the current page.

  • Get Canonical URLname="CanonicalUrl"): {% tdk with name="CanonicalUrl" %}:Canonical URL (规范链接) is very important in SEO, it can solve the problem of duplicate content.The CMS also supports setting standard links for pages.linkLabel.

Through this powerfultdkTags, you will find that maintaining website TDK becomes very easy.No need to modify complex template logic, just configure at the corresponding position in the background, and the front-end will automatically display the correct SEO information.

In addition to TDK, the SEO toolbox of Aiqi CMS

TDK settings are just a microcosm of the many SEO features of Auto CMS. As a highly SEO-friendly system, it also includes many other tools to collectively ensure the search engine performance of the website:

  • Static and 301 Redirect Management:Optimize URL structure, solve the SEO loss caused by link changes.
  • Sitemap and Robots.txt configuration:Help search engines better crawl and understand website content.
  • Keyword library management and anchor text setting:Enhance content relevance and internal link value.
  • Multi-site and multi-language support:Localized SEO for different markets and user groups.

The organic combination of these functions makes the Anqi CMS not only a content management system but also a comprehensive SEO optimization platform.

Summary

AutoCMS provides a highly efficient, flexible and easy-to-use dynamic TDK setting solution. Through detailed configuration in the background for different page types, and using a concise template in the front-end.tdkWe can easily implement precise management of the website's TDK by unifying the tags.This not only greatly improves the visibility and attractiveness of the website in search engines, but also saves a lot of time and effort for operators, allowing them to focus more on creating and spreading high-quality content.


Common Questions (FAQ)

  1. Why did I set the TDK for the article, but saw the homepage TDK in the page source code?This is usually because your template may not be using it correctlytdkLabel to dynamically obtain the TDK of the article layer, ortdkThe parameter settings of the label are incorrect (for example, some are missingnameattribute). Please check your template file (