Hugo LoveIt theme categories page modification
Introduction
The default categories page in the LoveIt theme can be quite dull, with every category represented by a folder icon. This article documents how to modify the categories page in the LoveIt theme to allow custom images for each category.


Modifying terms.html
Navigate to the /layouts/taxonomy/terms.html file in the website’s root directory. This file contains the templates for category and tag pages. Currently, I have no intention of modifying the tag page, but if needed, terms.html is the place to start.
To modify the category page, locate the following code in terms.html:
| |
Replace it with:
| |
With this, we have completed the most important modification.
Modifying list.html
Next, open the /layouts/taxonomy/list.html file in the website’s root directory and locate the following code:
| |
Replace it with:
| |
Aligning Images and Text
To align the newly added images with the text and adjust their size, we need to modify the custom.css file, which was introduced in the article Modify the font of the navigation bar in Hugo.
Open the /assets/css/custom.css file in the website’s root directory and add the following:
| |
With this, all necessary modifications are complete.
Usage
Navigate to the /content/categories/ directory in the website’s root directory and create a folder named after the category you want to modify. Inside the folder, add language-specific files as follows:
| |
Inside the language file, add the following content:
| |
Replace "Category Name" with the appropriate category name and set featured_image to the desired image URL. If featured_image is left as "", the default folder icon will be displayed.
Example:
| |
Conclusion
Modifying the categories page in the LoveIt theme for Hugo is not difficult. With just a few small changes, the once dull category page can become visually appealing. Why not try customizing it yourself?
Environment
- Hugo 0.144.2
- LoveIt theme (version from GitHub on February 21, 2025)

![[Test] Website Network Connection Speed Test](https://josh-test-lab.github.io/posts/Website%20Network%20Connection%20Speed%20Test/cover%20image.webp)
![[Thoughts] 2024 Joint Conference of University Administrators for Teacher Education](https://raw.githubusercontent.com/Josh-test-lab/website-assets-repository/refs/heads/main/posts/2024%20Joint%20Conference%20of%20University%20Administrators%20for%20Teacher%20Education/cover%20image.webp)



