Search engine optimization (SEO) is a key factor in the success of a website, and the page title (Title), keywords (Keywords), and description (Description), which we often call TDK, are also the core elements that search engines understand and display your web page content.They not only affect the willingness of users to click on search results, but also directly relate to the ranking performance of the website in search engines.

AnQiCMS as a corporate-level content management system has always given full consideration to SEO friendliness from the beginning of its design.It provides a flexible and efficient mechanism that allows you to easily dynamically generate and display these important TDK information, thereby helping your website content to be more easily discovered and understood by search engines.

Next, we will delve into how to effectively utilize these features in AnQiCMS.

Overview of TDK settings in AnQiCMS

In AnQiCMS, the TDK settings are not fixed, but provide multi-level configuration options based on page type and specific content to achieve fine-grained management.Understanding these setting levels is crucial for dynamically generating and displaying TDK.

Firstly,you can set a global homepage TDK for the entire websiteNext,for various content detail pages of the website,includingThis is usually completed in the 'Background Settings' under the 'Home Page TDK Settings'.Here, you can define the default title, keywords, and description for the home page of the website.These settings will serve as the final fallback content on pages without more specific TDK definitions.

Articles,products,single pages,categories and tagspages,AnQiCMS provides an independent TDK setting area.When editing articles, products, single pages, categories, or tags, you will see special "SEO title", "keywords", and "description" fields.For example, in "Add document" or "Document category help" there are clear SEO title and keyword/description settings.

These page-level TDK settings have higher priority.This means that when a page (such as a specific article) has its own TDK settings and the global homepage TDK, the system will prioritize the TDK defined by the page itself.If a page does not explicitly set a description but contains a lot of text, the system will also intelligently extract some text from the page content automatically to ensure that each page has complete TDK information.This flexible configuration method ensures that each page of your website has the most accurate and relevant SEO metadata.

Display TDK dynamically in the template

AnQiCMS provides powerful template tags, allowing you to easily dynamically call and display TDK information on the front-end template of the website. Among them,tdkThe universal tag is the core tool to achieve this goal, it can intelligently output the most suitable title, keywords, and description according to the type of the current page and the configured TDK priority.

Generally, you will use these tags in the<head>area of the template file.

Page Title (Title)

Page'sTitleTags are the content that search engines and users see first, and it is crucial to control them accurately. Usetdkwhen using tags, byname="Title"The parameter can be used to obtain the title of the current page.

You can display the page title in the following way:

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

In many cases, we want the page title to include the name of the website to enhance brand recognition. At this time, you can usesiteNameProperty.

{# 显示网站名称后缀 #}
<title>{% tdk with name="Title" siteName=true %}</title>

By default,siteName=trueIt will append the website name to the title and use a hyphen-As a separator. If you want to use a custom separator, you can usesepattribute:

{# 自定义分隔符为下划线 "_" #}
<title>{% tdk with name="Title" siteName=true sep="_" %}</title>

For category or content detail pages, sometimes you may also need to reflect the name of the parent category in the title to enhance the sense of hierarchy and relevance.showParent=trueAttributes can help you achieve this:

{# 显示上级分类标题 #}
<title>{% tdk with name="Title" siteName=true showParent=true %}</title>

Page Keywords (Keywords)

Keywords are important clues to help search engines understand the theme of a page. In the AnQiCMS template, bytdkLabel collaborationname="Keywords"you can dynamically obtain and display.

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

Page Description (Description)

The page description is a summary of the search engine results below the title, which usually affects the click-through rate. ThroughtdkLabel collaborationname="Description", you can easily output the page description information.

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

Standard Link (CanonicalUrl)

Standard linkCanonicalUrlIt is an important SEO element used to tell search engines which is the authoritative version of a page, especially when there is duplicate content or multiple URLs pointing to the same content.AnQiCMS can also intelligently generate standard links.

In the template, you need to first check if the standard link exists, and then set it to avoid outputting empty tags.

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

**Tips and Techniques

During the process of dynamically generating and displaying TDK, adhering to some practices can maximize your SEO effect:

  • UniquenessEnsure that the TDK of each page is unique and highly relevant. Avoid using the same TDK on a large number of pages, as this will dilute the weight of each page.
  • Keywords naturally integrateIn the title and description, naturally integrate the core keywords, but avoid cluttering. The description should be a short, attractive text that summarizes the page content and encourages users to click.
  • The difference between SEO title and content titleRemember that the content you fill in the 'SEO Title' field in the background is for search engines to see, while 'Document Title' and so on are for users to read on the page.These can be the same or different, strategically utilizing this difference can optimize search engine crawling while兼顾 user experience.
  • Utilizing a keyword library: AnQiCMS has built-in keyword library management functionality.Fully utilize it, it can help you easily select and manage keywords during content editing, ensuring the standardization and consistency of TDK.
  • Focusing on user intent: Always think about the keywords your target users might search for when writing TDK, and what kind of wording might attract them to click.

By using the flexible and powerful TDK management mechanism provided by Anqi CMS, you can easily achieve dynamic generation and precise control of the website's TDK.Properly configure the background settings and combine the clever use of template tags, so that your website content will have better visibility in search engines, thereby attracting more target visitors.

Frequently Asked Questions (FAQ)

**1. AnQiCMS page T