Search Engine Optimization (SEO) is a key factor for the success of a website, and the page title (Title), keywords (Keywords), and description (Description), which we often call TDK, are 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 an enterprise-level content management system, was designed with SEO-friendliness in mind from the very beginning.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 management.Understanding these setting levels is crucial for dynamically generating and displaying TDK.

Firstly, you can set a TDK for the entire website.Global home page TDK..This is usually completed under the 'Background Settings' in the 'Home Page TDK Settings' in the background.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.

Secondly, for various content detail pages of the website, including.Articles, products, single pages, as well as category and tag pages.AnQiCMS also 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 Classification 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 large amount of text, the system will also intelligently extract part of the content as a description from the page to ensure that each page has complete TDK information.This flexible configuration method ensures that every 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 website front-end template.tdkThe universal tag is the core tool to achieve this goal, it can intelligently output the most suitable title, keywords, and description based on the type of the current page and the configured TDK priority.

通常,You will usually find these in the template file<head>area using these tags.

Page Title (Title)

of the pageTitleTags are the first content that search engines and users see. It is crucial to control them accurately. Usetdkwhen labeling,name="Title"The parameter can be used to obtain the current page's **title**.

You can display the page title in the following ways:

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

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

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

By default,siteName=trueThe website name will be appended to the title after a hyphen-As a delimiter. If you want to customize the delimiter, you can usesepProperties:

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

For category or content detail pages, you may sometimes 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)

The keyword is an important clue for search engines to understand the theme of the page. In AnQiCMS templates, throughtdklabel combined withname="Keywords"you can dynamically obtain and display it.

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

Page Description (Description))

The page description is a snippet of text that appears below the title in search engine results, usually affecting the click-through rate. Bytdklabel combined withname="Description", you can easily output the page description information.

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

Canonical Link (CanonicalUrl)

Canonical LinkCanonicalUrlIt is an important SEO element used to inform search engines which is the "authoritative" version of the 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 determine if the specification link exists, and then proceed with the settings to avoid outputting empty tags.

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

Practice & Tips

During the dynamic generation and display of TDK, adhering to some practices can maximize your SEO effectiveness:

  • 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 should be naturally integrated:Incorporate core keywords naturally in the title and description, but avoid keyword stuffing. The description should be an engaging, concise paragraph that summarizes the page content and encourages users to click.
  • The difference between SEO title and content titlePlease remember that the content you fill in the 'SEO Title' field in the background is for search engines to see, while 'Document Title' and others are for users to read on the page.These can be the same or different. Strategically utilizing this difference can optimize both user experience and search engine crawling.
  • Using a keyword libraryEnglish: AnQiCMS built-in keyword library management function.Make full use of it, which can help you more conveniently select and manage keywords when editing content, ensuring the standardization and consistency of TDK.
  • Focus on user intent:In writing TDK, always think about what keywords your target users might search for, and what kind of language will attract them to click.

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

Common Questions (FAQ)

**1. AnQiCMS 中页面的 English