In today's increasingly important digital marketing era, a website's Title, Description, and Keywords (TDK) tags are like the 'ID card' and 'business card' of the site, directly affecting how search engines understand the website content and thus determining the site's ranking and click-through rate in search results.As an experienced website operation expert, I know 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, which provides a powerful content management platform for operators with its high efficiency, customizability, and SEO-friendly features.System built-in comprehensive TDK configuration function, which can flexibly set exclusive TDK tags for the homepage, article detail page, category list page, or independent single page.However, many operators may wonder: Does AnQiCMS provide a simple and intuitive batch export TDK feature for comprehensive review?Frankly, there is no one-click "Export All TDK" button in the AnQiCMS backend management interface.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 the TDK Management Mechanism of AnQi CMS
To implement batch export, we first need to clarify the storage and management methods of TDK tags in AnQiCMS. AnQiCMS distributes TDK tags for different types of pages across their respective management modules, which conforms to the logic of content management and 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 'Content Management' -> 'Publish Document' or 'Document Management', edit specific fields including 'SEO Title' (corresponding to Title), 'Document Keywords' (corresponding to Keywords), and 'Document Summary' (usually used as Description). This information is stored in the document model (for example
archiveTable field relevant to - Category page TDKSet in “Content Management” -> “Document Classification”, it also includes “SEO Title”, “Keywords”, and “Category Description”, stored in the category table (for example
categoryTable) corresponding field. - Single page TDK:In the "Page Resources" -> "Page Management" configuration, the field structure is similar to that of article pages and category pages, stored in a single page table (for example
pagetable).
Understanding these storage locations is the basis for batch exports.
Batch retrieval at the database level: the most direct method
For operators who need to obtain all TDK data comprehensively and in bulk, extracting it directly from the database level is the most thorough and efficient method.This requires you to have a basic understanding of the database and access privileges to the database (such as through phpMyAdmin, Navicat, or command-line tools).
AnQiCMS usually uses MySQL database. We can extract the required data from the relevant tables through simple SQL queries:
Connect to the databaseUse your database management tool to connect to the database used by the AnQiCMS website.
Locate key tables and fields:
- Article/Document TDK: In
anqi_archives(or similar name, depending on your system configuration) Search in the tableseo_title,keywords,descriptionfield. - Category TDK: In
anqi_categoriesSearch in the tableseo_title,keywords,descriptionfield. - Single page TDK: In
anqi_pagesSearch in the tableseo_title,keywords,descriptionfield. - Home TDK: Usually in
anqi_settingsThe table, stored in the form of key-value pairs, for exampleSiteName(用于 Title),SiteKeywords,SiteDescription. You may need to further filter out records related to the home page TDK.
- Article/Document TDK: In
Execute SQL query and export: You can construct similar SQL queries 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, making it convenient for you to review, sort, and filter them in spreadsheet software.
温馨提示:Before directly operating on the database, you must 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': Advanced flexible solution
For operators with certain front-end or template development capabilities, or teams with long-term and frequent review needs, it is recommended to develop a temporary "TDK Review Page" based on the existing templates of AnQiCMS.This page is not publicly accessible and is only for internal operational teams to use. It can dynamically pull and display all pages' TDK information.
The AnQiCMS template system supports Django template engine syntax, and providesarchiveList/categoryList/pageListEnglish tags for obtaining different types of content lists, while pairing with powerfultdktags, which can directly obtain TDK data for each page.
- Create a new template fileIn your template directory (for example)
template/defaultCreate a new HTML file, such astdk_review.html. - Write template codeIn this file