In AnQi CMS, effectively utilizing keywords (Keywords) and tags (Tags) is the key to optimizing content structure, improving search engine visibility (SEO), and enhancing user experience.They not only help websites better organize content, but also guide users to discover more relevant information.Next, we will delve into how to reasonably add these elements to the article content and ensure that they can be displayed correctly on the website's detail page or list page.

1. Add keywords in the article content

Keywords are words that describe the core theme of the article and are crucial for search engines to understand the content.When you publish or edit articles in the Anqi CMS backend, you will see a field named "Document Keywords".

How to add:

  1. Manual input:In the 'Document Keywords' box, you can directly type in words highly relevant to the article content. Please note that multiple keywords should be separated by English commas.,Perform separation. This separation method not only conforms to the search engine's crawling habits, but also helps the system accurately identify each keyword.For example, an article about "AnQi CMS tutorial" can be entered as
  2. Select from keyword library:The AnQi CMS provides the 'Keyword Library Management' feature, you can also add appropriate words to the article by clicking the 'Select Keyword' button from the preset keyword library.This is very helpful for maintaining consistency and standardization of keywords.

By carefully selecting and inputting keywords, we provide important clues to search engines, enabling them to better understand the content of the article, thereby increasing the chance that the article will be displayed when users search for related information.

Second, add Tag tag to the article content

Tags provide a more flexible way to associate content than categories, allowing articles discussing specific topics to be connected across different categories and content models, forming an interactive knowledge network.

How to add:

  1. Add on the article editing page:In the 'Add Document' or 'Edit Document' interface, you will find the 'Tag' field.You can select an existing tag here, or enter a new tag name, then press Enter, and the system will recognize and convert it into a new tag.For example, in addition to being categorized as "Product Introduction", an article about the new features of AnQi CMS can be tagged with "New Features", "System Update", "Go Language Development", and so on.
  2. Tag Management:If you need to manage tags more precisely, such as changing the name, URL alias, SEO title, or description, you can visit the background "Document Tag" management interface.Here you can independently manage all tags, and even set up independent templates for tags to achieve more personalized display effects.

The flexible use of tags makes the organization of content more three-dimensional, allowing users to explore more interesting content along the tag线索, greatly enhancing the internal link quality and user stickiness of the website.

Three, display keywords in detail page or list page

Keywords are typically used in a website's metadata (Meta Data) to help search engines understand the page topic rather than directly displaying it to users. In the website template, we can use the Anqicms providedtdkTag to call these keywords.

Display keywords on the detail page (usually used in the HTML head section):In most cases, the keywords of the article will be used as<meta name="keywords" content="...">The tag content appears in the HTML header of the page, for search engines to crawl. In your template file (such asdetail.html), you can use the following method to call it:

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

If you want to display keywords directly in the article content area, although it is not common, it can also be done througharchiveDetailtag to retrieve and display:

<div>文章关键词:{% archiveDetail with name="Keywords" %}</div>

Remember that multiple keywords will still be displayed separated by English commas.

Tag tags are displayed in detail pages or list pages.

The value of a tag lies in its clickability, which is usually displayed as a link to guide users to more relevant content. In AnQi CMS, you can access it bytagListThe tag easily realizes this function.

Display related Tag tags on the article detail page:In the article detail page (for examplearchive/detail.htmlTemplate), we hope to display all the tags of the current article.tagListTags can help us achieve this, it will automatically identify the document ID of the current page and list the associated tags.

<div>
    <strong>相关标签:</strong>
    {% tagList tags with itemId=archive.Id limit="10" %}
    {% for item in tags %}
        <a href="{{item.Link}}" class="tag-item">{{item.Title}}</a>
    {% endfor %}
    {% endtagList %}
</div>

This code will traverse all the tags of the current article and generate clickable links for each tag.item.LinkProvide the URL of the tag page,item.TitleIt displays the name of the tag.

Display the Tag tags on the article list page:In the article list page (for examplearchive/list.htmlTemplate), if you want to display the associated tags below each article entry, you can usetagListNested in a tagarchiveListLoop inside:

{% archiveList archives with type="page" limit="10" %}
    {% for article in archives %}
    <div class="article-item">
        <h3><a href="{{article.Link}}">{{article.Title}}</a></h3>
        <p>{{article.Description}}</p>
        <div class="article-tags">
            {% tagList tags with itemId=article.Id limit="5" %} {# 限制显示5个标签 #}
            {% for tag in tags %}
                <a href="{{tag.Link}}" class="tag-link">{{tag.Title}}</a>
            {% endfor %}
            {% endtagList %}
        </div>
    </div>
    {% endfor %}
{% endarchiveList %}

In this way, every article can display its unique tags, enriching the information density of the list page.

Create an independent Tag tag list page:To allow users to browse all tags and view articles under each tag, we can create a separate Tag tag list page (usuallytag/index.htmlortag/list.htmlTemplate). Here, you can usetagDataListtags to get a list of articles under a specific tag and combinepaginationTagging implements pagination.

For example, intag/list.htmlin the template:

{% tagDetail currentTag with name="Title" %} {# 获取当前标签的标题 #}
<h2>{{currentTag}} 下的文章</h2>

{% tagDataList archives with type="page" limit="10" %}
    {% for item in archives %}
    <div class="tagged-article">
        <h3><a href="{{item.Link}}">{{item.Title}}</a></h3>
        <p>{{item.Description}}</p>
        <span>发布日期:{{stampToDate(item.CreatedTime, "2006-01-02")}}</span>
    </div>
    {% endfor %}
{% endtagDataList %}

<div class="pagination-area">
    {% pagination pages with show="5" %}
        {# 你的分页HTML代码 #}
        {% if pages.PrevPage %}<a href="{{pages.PrevPage.Link}}">上一页</a>{% endif %}
        {% for item in pages.Pages %}<a class="{% if item.IsCurrent %}active{% endif %}" href="{{item.Link}}">{{item.Name}}</a>{% endfor %}
        {% if pages.NextPage %}<a href="{{pages.NextPage.Link}}">下一页</a>{% endif %}
    {% endpagination %}
</div>

This design not only makes it easier for users to find relevant content, but also provides a clear site structure for search engines, which is beneficial for SEO.

V, SEO Optimization and User Experience

Fully utilizing keywords and Tag tags can significantly improve the SEO performance and user experience of the website.Keywords help search engines understand the theme of your content, and Tag tags create rich internal link structures, which help to enhance page authority transmission.The pseudo-static URL feature of AnQi CMS (for exampletag-{id}(-{page})Formatted Tag URL, ensuring that these tag pages have SEO-friendly URL addresses.

By following these steps, we not only enriched the information of the article at the content level, but also utilized the powerful functions of Anqicms on the technical level, ensuring that keywords and Tag tags can be effectively managed and displayed, thereby bringing better traffic and user interaction to the website.


Frequently Asked Questions (FAQ)

  1. What is the difference between keywords and Tag tags? How should I choose to use them?Keywords are mainly used to describe the core content of an article, more often provided to search engines as page metadata (meta keywords) to help search engines understand the theme of the page.Although some CMS may display on the front end of the page, its main function is SEO.And Tag tags (Tags) is a more flexible way to organize content, used to associate all articles discussing the same topic on the site, forming a navigable network.Tags are usually presented as clickable links on the page, allowing users to browse and discover more related content, emphasizing user experience and internal links.When selecting, the keyword should accurately summarize the content, while Tag labels can be more general or multidimensional to describe the content theme, promoting content discovery.

  2. Why did my article not display on the front end after adding Tag tags?There are usually several reasons for this situation:

    • The template has not been called:Your website template (especially the article detail page or list page template) may not be usingtagListUse the tags provided by Anqie CMS to call and display Tag information. You need to edit the corresponding template file and add code snippets similar to those provided in the article.tagListCode snippet.
    • Cache problem:Even if the template has been modified, the caching mechanism of the website may cause the changes not to be displayed immediately. Please try to clear the system cache of the Anqi CMS backend, or refresh your browser cache.
    • CSS style hiding:The tag may already be displayed on the page, but due to CSS style settings (such as display: none;It was hidden. You can check the page HTML structure through the browser's developer tools to confirm that the tag exists.
  3. How to make the Tag label page have better SEO performance?To optimize the SEO of the Tag label page, you can start with the following aspects:

    • Friendly URL structure:Ensure that the URL of the Tag tag page is static and meaningful, for exampleyourdomain.com/tag/seo-optimization.htmlThe AnQi CMS usually handles this through the static rule automatically.
    • Improve the tag details:In the "Document Tag" management in the background, set a unique "SEO title", "tag keywords", and "tag description" for each tag. This information will be used on the tag page.<title>/<meta name="keywords">and<meta name="description">Tag, enhance the understanding of search engines for tabs.
    • High-quality tag content:Ensure that the number of articles associated with each tag is sufficient and the content quality is high.Avoid creating a 'blank tab page' with only one or two articles, as it will be considered low-quality content by search engines.
    • Provide tag description:If the Tag label page allows, you can add a brief, original text description at the top of the page, explaining the theme covered by the label to enrich the page content.
    • Internal and external links:Ensure that the Tag label page can be effectively linked from other pages (internal links), and if possible, strive for some high-quality external links.