How to automatically extract document content to generate a summary or thumbnail for list display in AnQiCMS?

Calendar 👁️ 59

How to present content in a list page in an attractive way while not requiring a lot of manual work in website operation?This is often a headache for operators. AnQiCMS understands this pain point and provides us with a set of effective solutions through its powerful automation features, especially excelling in the automatic generation and application of document descriptions and thumbnails.

Intelligently extract document summaries, goodbye to manual writing

Imagine, after each article is published, you need to manually write a concise summary, what a time-consuming task this is.AnQiCMS cleverly solved this problem. When you add or edit a document, if the 'Document Summary' field is left blank, the system will not allow it to be empty.On the contrary, it will intelligently grab about 150 characters from the beginning of the document content as the default introduction of the article.This means that even if you forget to fill in or are in a hurry, your article can still have a concise and clear text summary on the list page, helping readers quickly understand the main points of the article and enhance the willingness to click.

Of course, AnQiCMS also provides full flexibility.If you are not satisfied with the automatically generated summary or want to have more precise control over the presentation of content, full support is provided for manual input and editing.The manually entered summary will be displayed first, ensuring you have the final say in content presentation.When displaying on the list page, we only need to use the corresponding description field (such asitem.Description),These introductions can naturally appear in front of readers.

Automatically generate thumbnails to enhance visual appeal

In addition to the text introduction, a well-chosen thumbnail can undoubtedly enhance the visual appeal of the list page.AnQiCMS in this regard also demonstrates its intelligent side.When we publish an article containing images without manually uploading a thumbnail, the system will automatically identify and extract the first image from the article content, using it as the default document thumbnail.This feature was introduced in AnQiCMS V1.0.0-alpha and has been continuously improved.This mechanism ensures that every article on the list page has a visual element, even if it is a new post that has not been processed in time, it can still be displayed well, keeping your website professional and beautiful.

AnQiCMS offers a wide range of custom options for thumbnail processing to meet the design needs of different websites.In the background "Content Settings", we can flexibly adjust the thumbnail size.Further, you can also choose different ways of handling, such as:

  • Scale proportionally to the longest side: The image will be displayed in full, but will be proportionally scaled according to the longest side.
  • Trim according to the shortest edgeThe image will be cropped in the center, ensuring that the shortest side is fully displayed, and part of the longest side may be cropped off.
  • Fill the longest sideThe image is displayed in a fixed aspect ratio, and the insufficient part is filled with white.

These settings allow thumbnails to maintain visual consistency while also adapting to a diverse layout.If the article indeed does not contain any images, or you wish to have a unified visual style, AnQiCMS also allows you to set a default thumbnail as a fallback solution to ensure the neatness and consistency of the list page.If the style or size of the thumbnail has been adjusted later, AnQiCMS also supports batch regeneration of thumbnails, saving the trouble of a lot of manual operations.

When called in the template, we can useitem.Thumbto display the thumbnail processed by the system, oritem.LogoShow the cover main image (usually the main image you have specifically set), depending on which visual presentation of the list you prefer.

Smooth display on the list page

Whether it is an article, product or single page, AnQiCMS' document list tag (such asarchiveList), category list tag (categoryList) and single page list tag (pageListThese can all well support the display of automatically extracted and generated summaries and thumbnails.

When building a list template, we only need to iterate through (for example){% for item in archives %}and call them separately.{{item.Description}}Show the article summary as well{{item.Thumb}}or{{item.Logo}}Display thumbnails. The system will automatically fill in these contents based on actual conditions, making the information on the list page rich and beautiful.This integrated design greatly simplifies the workflow of content operators, allowing website content to be displayed quickly and standardizedly to users after publication.These automated features not only improve the efficiency of content publishing, but also optimize the website's user experience and search engine performance unintentionally.A well-structured introduction and appropriate thumbnails can attract more clicks, while standardized content presentation helps enhance the professional image of the website.By flexibly using the various settings of AnQiCMS, we can find a **balance point between automation and personalization, making the website's content operation both efficient and distinctive.


Frequently Asked Questions (FAQ)

1. Why doesn't my article show a thumbnail I uploaded manually, and there are no images displayed on the AnQiCMS list page?This is usually because there are no images included in your article content, or even if there are images, they may be referenced through external links, and you have turned off the option 'Download remote images' in the 'Content Settings'.AnQiCMS defaults to extracting the first local image from the article content as a thumbnail.If the article has no image and no default thumbnail is set, the list page will naturally not display the image.You can upload a 'default thumbnail' in the 'Content Settings' as a backup for all articles without images.

2. Can the automatically extracted introduction text be adjusted if it is too short or too long?AnQiCMS currently automatically extracts the number of characters in the introduction as the first 150 characters of the document content.If you need a longer or shorter summary, the only way is to manually enter the content you want to display in the 'Document Summary' field on the document editing page.The manually entered description will override the automatically extracted description.

3. Can AnQiCMS force the thumbnails on the list page to display in a fixed aspect ratio?Yes, AnQiCMS provides various thumbnail processing methods to meet your needs.In the "Content Settings" on the backend, you can set the "Thumbnail Size" to a specific width and height (e.g., 200x150 pixels), and then select the "Thumbnail Processing Method" to either 'Crop to Shortest Side' or 'Pad to Longest Side'.These two methods can both help you achieve a fixed aspect ratio for thumbnails, the difference being that cropping will lose some of the image edges, while padding will add blank areas around the image.You can choose the most suitable way based on the actual design effect.

Related articles

How to add recommended attributes to AnQiCMS documents to affect the display sorting order on the front page list and detail pages?

In Anqi CMS, the recommended attribute is a very practical feature in content operation.It can help us classify content for marking, which in turn affects how the content is displayed on the front list or detail page, such as highlighting, prioritizing sorting, and even changing their layout style.Understand and make good use of these properties, which will make your website content management more flexible and efficient. ### One, set recommended properties for documents in the background To add recommended properties to a document, you first need to log in to the AnQi CMS backend management interface. 1. Enter the document editing page

2025-11-07

How does AnQiCMS achieve adaptive display for PC and mobile pages?

In today's era of coexistence of multiple devices, whether a website can present a good user experience on different screen sizes is directly related to its influence and commercial value.Whichever device the user accesses, whether it is a desktop computer, laptop, tablet, or smartphone, they all expect to see a page with clear layout and easy operation.AnQiCMS (AnQiCMS) is well aware of this core requirement and therefore integrated a variety of flexible adaptive display strategies from the outset to ensure that your website can be presented in **status** on any device.AnQi CMS provides three main website display modes

2025-11-07

How to include common header and footer code snippets in AnQiCMS templates?

It is crucial to maintain consistent page layout, improve development efficiency, and reduce maintenance costs in website construction and content management.AnQiCMS as an efficient content management system provides a flexible template mechanism, allowing us to easily reuse common code snippets across different pages, such as the website header navigation, footer information, or sidebar, etc.This article will delve into how to elegantly introduce common header and footer code snippets in the AnQiCMS template, helping you better organize template files and improve the overall maintenance efficiency and user experience of the website.

2025-11-07

How to use AnQiCMS built-in tags to retrieve and display system configuration information (such as website name, Logo)?

It is crucial to maintain consistency and ease of updates in website operation and management.AnQiCMS as an efficient content management system fully considers this point, providing powerful built-in tag functions, allowing the global configuration information of the website (such as website name, Logo, filing number, etc.) to be easily dynamically obtained and displayed in the front-end template.This means you do not need to hardcode, just make a change in one place in the background, and all pages referencing this information will update automatically, greatly enhancing the maintainability and operational efficiency of the website.

2025-11-07

How to use the AnQiCMS Tag feature to associate and display related documents?

In today's increasingly complex content management, how to efficiently organize and present website content, allowing users to easily find the information they are interested in, while also improving the website's search engine performance, is a problem that every website operator is thinking about.AnQiCMS provides a series of powerful features to meet these challenges, among which, the Tag feature is undoubtedly a great tool for connecting and enriching content relationships.Tag, in the literal sense, is like various small tags attached to articles or products, which can cross traditional classification boundaries and bring together topics with the same theme

2025-11-07

How to flexibly display custom content model fields on the front page of AnQiCMS?

In the world of content management, flexibility is the key to website success.Most of the time, we find that the standard "article" or "product" content model cannot fully meet our unique business needs, such as the need to add unique attributes such as "material", "size", etc. for a specific type of product, or to add information such as "registration deadline", "event location", etc. to the activity detail page.At this moment, the powerful custom content model function of AnQiCMS can fully show its strength.

2025-11-07

How to ensure that the encoding of AnQiCMS template files is correct to avoid page garbled characters?

When using AnQiCMS to build a website, we may encounter abnormal display of pages, with garbled characters.This is usually due to incorrect encoding settings in the template file.Ensure that the template file uses the correct encoding is a key step to avoid such problems, ensure the normal operation of the website, and provide a good user experience.AnQiCMS as a modern content management system, its internal processing and recommendation standards tend to use UTF-8 encoding.UTF-8 is an international character encoding that can be compatible with the characters of most languages in the world, including Chinese

2025-11-07

How to implement Markdown format content rendering and display on the AnQiCMS web page correctly?

In the digital age, the efficiency of content creation and publishing is the key to the success of the website.Markdown as a lightweight markup language, with its concise and efficient features, is increasingly favored by content creators.AnQiCMS knows this need, providing excellent Markdown support to users, making content creation more convenient, while ensuring that the web page presents a beautiful and clear structure.

2025-11-07