As an experienced website operator familiar with AnQiCMS, we know that every detail of the website can affect its performance in search engines and the user experience.Among them, TDK (Title, Description, Keywords) is the most critical metadata of the web page, and its setting is particularly important.In AnQiCMS,{% tdk %}Labels provide a convenient way to manage these important SEO elements. This article will focus on one practical parameter of this tag-sepExplore how to flexibly adjust the connecting characters between elements in the page title (Title) to optimize the display effect of the website.
Get to know{% tdk %}Tag
{% tdk %}The tag is the core tool used in the AnQiCMS template system to output page SEO metadata.It can dynamically retrieve the title (Title), keywords (Keywords), and description (Description) information of the current page.This information may come from global settings, category settings, independent settings on the article detail page, or be automatically generated by the system.Use accurately and effectively{% tdk %}The tag is the first step to ensure that the website content is correctly indexed by search engines and attracts users to click. Through this tag, we can display important elements on the front page of the page.<title>/<meta name="keywords">and<meta name="description">and other elements on the front page.
Deep understandingsepParameter
When managing the page title,{% tdk %}the label provides a namedsepthe parameter is specifically used to define the connector between different components of the page title. When we{% tdk %}the tagname="Title"use it to obtain the page title, thissepThe parameter can take effect.
By default, AnQiCMS will combine the various parts of the page title (such as, the page itself title and the website name) with a half-width hyphen.-Perform connection. For example, if the page title is "About Us", the website name is "AnQi CMS", and the tag is enabled insiteName=truethen the default output is<title>The label content may be "About Us - AnQi CMS".
However, under certain design or brand requirements, we may need to use different connectors, such as underscores._、vertical line|Even a space-containing». At this point,sepparameter comes into play. By explicitly specifying in the tagsepThe value, we can easily override the default connector. It allows us to customize these connectors to better fit the brand style of the website or the readability requirements of specific contexts.
Here are severalsepExamples of parameter usage, showing how to adjust the page title separator:
Using the default separator (no
sepparameter):<title>{% tdk with name="Title" siteName=true %}</title> {# 假设页面标题为 "产品详情",网站名称为 "我的品牌",输出可能是:产品详情 - 我的品牌 #}Specify a custom separator as an underscore
_:<title>{% tdk with name="Title" siteName=true sep="_" %}</title> {# 输出可能是:产品详情_我的品牌 #}Specify the custom delimiter as a vertical line
|(Note the spaces to enhance readability):<title>{% tdk with name="Title" siteName=true sep=" | " %}</title> {# 输出可能是:产品详情 | 我的品牌 #}
sepActual application and suggestions for parameters
Reasonable choicesepThe connector not only concerns the visual cleanliness of the page, but may also affect the user's perception of the readability of the title.Although search engines usually ignore the specific style of hyphens themselves, a clear and consistent title structure helps improve user experience and indirectly affects click-through rate.
In practice, it is recommended to choose a connector based on brand image and industry habits. For example, many technology websites tend to use-or_, while news or portal websites may prefer|. Regardless of the choice, you should ensure the consistency of the full site title connector to avoid confusion. In addition, when usingsep, pay attention to whether the function has been enabledsiteName=trueparameters, as well asshowParent=trueParameters (used to display the parent category title), becausesepMainly used to connect the page title with the website name or parent element. If these components do not exist,sepThe connecting function will not be reflected.
Summary
{% tdk %}label'ssepThe parameters may seem trivial, but they are an important tool provided by AnQiCMS for website operators to carry out fine-grained SEO management and brand display.By flexibly adjusting the connecting symbols between title elements, we can create page titles that are more in line with the brand's character and more attractive to users, thereby enhancing the overall performance of the website.
Frequently Asked Questions (FAQ)
Q:
sepIs the parameter correct?KeywordsandDescriptionIs it also valid?A: No,sepThe parameter only applies toname="Title"It is valid, used to connect different parts of the title, such as the page title and the website name.KeywordsandDescriptionIt is usually an independent content string and does not require internal connector adjustments.Q: If not set
sepParameter, what is the default connector?A: If not specifiedsepParameter, AnQiCMS system uses a half-width hyphen by default-as a connector between the elements of the page title.Q: In what situation?
sepThe parameter may not take effect?A:sepThe parameter is mainly used to connect the page title with the website name (throughsiteName=trueEnable) or parent category title (viashowParent=trueEnable). If{% tdk with name="Title" %}The tags do not enable these parameters simultaneously, or the page title itself is only one component (for example, only output the page title itself without concatenating other information), thensepThe parameter may not reflect its connecting function.