Today, with the increasing importance of digital marketing, a website's Title, Description, and Keywords (TDK) tags are like the 'ID card' and 'business card' of the website, directly affecting how search engines understand the website's content and consequently determining the website's ranking and click-through rate in search results.As an experienced website operations expert, I am well aware of the importance of regularly reviewing TDK tags for maintaining the SEO advantage of the website, especially when the number of web pages is large, batch management and review become particularly crucial.
AnQiCMS (AnQiCMS) is an enterprise-level content management system developed based on the Go programming language, providing a powerful content management platform for operators with its high efficiency, customizable, and SEO-friendly features.The system has a comprehensive TDK configuration function, which can flexibly set exclusive TDK tags for home pages, article detail pages, category list pages, or independent single pages.However, many operators may be puzzled: Does AnQiCMS provide a simple and intuitive batch export TDK feature for a comprehensive review?Frankly, there is no one-click 'export all TDK' button in the AnQiCMS back-end management interface.But this does not mean that we cannot achieve this goal. With the powerful architecture and flexibility of AnQiCMS, we have several effective methods to complete this task.
Deep understanding of Anqi CMS's TDK management mechanism
To implement batch export, we first need to clarify the storage and management method of TDK tags in AnQiCMS. AnQiCMS distributes the TDK tags of different types of pages across their respective management modules, which conforms to the logic of content management and also ensures a close association between content and SEO information:
- Home TDKConfigured uniformly in "Background Settings" -> "Home TDK Settings", usually stored in the system configuration table.
- Article/Document Page TDKIn the "Content Management" -> "Publish Document" or "Document Management" section, you can edit specific fields including "SEO Title" (corresponding to Title), "Document Keywords" (corresponding to Keywords), and "Document Description" (usually used as Description). This information is stored in the document model (for example
archiveTable related fields. - Category page TDKSet in the "Content Management" -> "Document Classification", it also includes "SEO Title", "Keywords", and "Category Description", stored in the category table (for example
categoryThe corresponding field of the table. - Single page TDKConfigure in "Page Resources" -> "Page Management", the field structure is similar to article pages and category pages, stored in a single page table (for example
pagetable) in.
Understand these storage locations are the basis for batch exports.
Batch retrieval at the database level: the most direct method.
For operators who need to comprehensively and in bulk obtain all TDK data, extracting it directly from the database level is the most thorough and efficient method.This requires a basic understanding of databases and access privileges to the database (for example, through phpMyAdmin, Navicat, or command-line tools).
AnQiCMS usually uses MySQL database. We can retrieve the required data from the relevant tables using simple SQL queries:
Connect to the database: Use your database management tool to connect to the database used by the AnQiCMS website.
Locate key tables and fields:
- Article/Document TDKIn
anqi_archives(or similar name depending on your system configuration) search in tableseo_title,keywords,descriptionfield. - TDK classificationIn
anqi_categoriessearch in tableseo_title,keywords,descriptionfield. - Single page TDKIn
anqi_pagessearch in tableseo_title,keywords,descriptionfield. - Home TDK: Usually in
anqi_settingsstored in table, in the form of key-value pairs, for exampleSiteName(used for Title),SiteKeywords,SiteDescription. You may need to further filter records related to the home page TDK.
- Article/Document TDKIn
Execute SQL query and export.You can build similar SQL query statements for each content type to extract data. For example, to export all articles' TDK:
SELECT id, title, seo_title, keywords, description FROM anqi_archives;The exported results can be saved as files in CSV, Excel, and other formats, convenient for you to review, sort, and filter in spreadsheet software.
Tips:Before directly operating on the database, it is necessary to back up your database! If you are not familiar with SQL statements, it is recommended to seek the assistance of a professional technical personnel to avoid unnecessary risks.
Customize the development of a "TDK Review Page": an advanced and flexible solution
For operators with certain front-end or template development capabilities, or teams with long-term and frequent review needs, consider developing a temporary "TDK Review Page" based on the existing AnQiCMS templates.This page is not publicly accessible; it is only for internal operation teams. It can dynamically pull and display TDK information for all pages.
AnQiCMS template system supports Django template engine syntax, providingarchiveList/categoryList/pageListLabels used to retrieve lists of different types of content, while also pairing with powerfultdkLabels can directly retrieve TDK data for each page
- Create a new template fileIn your template directory (for example
template/default), create a new HTML file such astdk_review.html. - Write template code: In this file