Pages

Main sections
Icy treats the pages in Hugo’s mainSections as blog posts. They fill the home page and the home feed, and get a year archive, a copyright card and the Open Graph article type. Hugo guesses the setting from the largest section, so set it explicitly:
mainSections = ['posts']mainSections:
- postsHome page
The home page shows, from top to bottom:
- An author intro: avatar, name, bio and social links, set up in Configuration.
- The body of
content/_index.md, if it has one. - Recent posts from the main sections, one line each. An “All posts” link appears when the list is cut short.
[params.home]
intro = true
recentCount = 8params:
home:
intro: true
recentCount: 8| Parameter | Default | Description |
|---|---|---|
intro | true | false hides the author intro. |
title | params.author.name | Heading of the intro. |
bio | params.author.bio | Text of the intro, Markdown. |
recentCount | 8 | Number of recent posts. 0 lists all of them. |
To keep a post off the home page but in the archive, set hiddenInHomeList = true in its front matter.
Archives and section lists
A main section, and every tag or category page, is an archive grouped by year. The subtitle shows the post count, or the section’s description if it has one. Drafts and protected posts carry a small label.
| Parameter | Default | Description |
|---|---|---|
params.list.groupByYear | true | false lists all posts in one list with full dates. |
params.list.paginate | false | true splits the archive into pages of pagination.pagerSize posts. |
Any other section, such as these docs, lists its pages by weight, each with its description. In both cases the body of the section’s _index.md appears above the list.
Tags
The tag index at /tags/ looks like the index at the back of a book. Tags are grouped by initial: digits, then A–Z, then “#” for everything else. Each row shows the name and the number of posts.
Protected posts are not counted, and a tag used only by protected posts is hidden. Categories and any other taxonomy use the same layout. To set the index’s title, description or intro text, create content/tags/_index.md.
Chinese tag names
On a Simplified Chinese site, a tag that starts with a Chinese character is filed under its pinyin initial. “图片” (tú) goes under T, next to “Typography”. On other sites, non-Latin names go under “#”.
The initial comes from the first character, so a character with several readings can land in the wrong group. To fix it, set initial on the tag’s term page:
+++
title = '重庆'
initial = 'C'
+++---
initial: C
title: 重庆
---initial is one letter or digit. On a multilingual site, put it in that language’s term page, such as content/tags/重庆/_index.zh-cn.md.
Search
Search runs in the browser against an index built with the site. Try it on this site’s search page. Create the page:
+++
title = 'Search'
layout = 'search'
searchHidden = true
toc = false
placeholder = 'Search titles, tags and text'
+++---
layout: search
placeholder: Search titles, tags and text
searchHidden: true
title: Search
toc: false
---Once the page exists, a search icon appears in the header. placeholder is optional, and the page body is shown under the title.
| Parameter | Default | Description |
|---|---|---|
params.search.page | /search | Page the header icon links to. |
params.search.maxResults | 20 | Maximum number of results. |
params.search.contentLimit | 20000 | Characters of body text indexed per page. |
- Every word you type must match. Case is ignored, and words match inside longer words, so Chinese and Japanese need no word splitting.
- Title matches rank first, then tags, the summary and the body.
- The query stays in the address, as in
/search/?q=hugo, so results can be linked. - Every regular page is indexed. Leave one out with
searchHidden = true. Protected posts are never indexed. - Each language has its own index. Search needs JavaScript.
Friends
A page of links to other sites, read from data/friends.yaml. This site’s Who uses Icy is one. Create a page with the friends layout:
+++
title = 'Friends'
description = 'Sites I read.'
layout = 'friends'
+++---
description: Sites I read.
layout: friends
title: Friends
---The page body appears above the list. List the sites in the data file:
- name: Hugo
url: https://gohugo.io/
avatar: https://github.com/gohugoio.png
description: The world's fastest framework for building websites.
- name: A friend
url: https://example.com/
avatar: friends/alex.png # assets/friends/alex.png
description:
en: Notes on gardening and code.
zh-cn: 关于园艺和代码的笔记。| Field | Required | Description |
|---|---|---|
name | Yes | Site or person name. |
url | Yes | An http or https link. |
avatar | No | Image path or URL, like any media path. |
description | No | Up to two lines. A string, or one text per language code. |
- Avatars are cropped to 96px. Remote avatars are downloaded at build time, so readers never contact the original host.
- Without an avatar, or when the download fails, the entry shows the first letter of the name.
- A missing
nameorurl, or a URL that is nothttp(s), fails the build. - Set
params.friends.refto add arefquery parameter to every link. - If the page is a section, its child pages are listed below the friends.
Changelog
A dated list of changes, kept in the page’s front matter. This site’s changelog is one.
+++
title = 'Changelog'
layout = 'changelog'
searchHidden = true
[[changes]]
date = 2026-11-23
title = 'Switched to the Icy theme'
summary = 'Assets now load **per feature**.'
[[changes]]
date = 2026-08-14
title = 'Self-hosted comments'
+++---
changes:
- date: '2026-11-23'
summary: Assets now load **per feature**.
title: Switched to the Icy theme
- date: '2026-08-14'
title: Self-hosted comments
layout: changelog
searchHidden: true
title: Changelog
---Each entry needs a date and a title, or the build fails. summary is optional, and both accept inline Markdown. Entries are grouped by year, newest first, below the page body.
About and other single pages
A page such as content/about.md is an ordinary page outside the main sections. It gets no copyright card and stays off the home page and the home feed. These front matter keys suit such pages:
+++
title = 'About'
toc = false
hideMeta = true
comments = false
schemaType = 'AboutPage'
+++---
comments: false
hideMeta: true
schemaType: AboutPage
title: About
toc: false
---All page keys are listed in Configuration.
404 page
Hugo writes 404.html at the site root, and under each language’s prefix on a multilingual site. It shows a short message and a link home. Your web server must serve it for missing paths: see Deployment.