Configuration

Icy has a default for every parameter, so set only what you want to change. Parameters that belong to a single feature are documented with that feature: see Elsewhere.

Hugo settings

Standard Hugo settings, outside [params], that Icy uses. The [markup] settings Icy needs are in Getting started.

SettingDescription
mainSectionsThe sections that hold your posts, such as ['posts']. See Main sections.
hasCJKLanguagetrue if you write in Chinese, Japanese or Korean, so word counts and reading times are right.
markup.goldmark.extensions.cjkFor Chinese and Japanese: joins the lines of a paragraph without a space.
pagination.pagerSizePosts per page when list pagination is on.
services.rss.limitMaximum number of items per feed.
copyrightOnly the RSS <copyright> element. The footer’s © line comes from params.footer.

A site written in Chinese adds:

hugo.toml
hasCJKLanguage = true

[markup.goldmark.extensions.cjk]
  enable = true
  eastAsianLineBreaks = true

Icy reads two menus: main in the header and footer at the bottom of every page. Give each entry a name, a weight and a target. Use pageRef for a page of your site, so the link follows the current language and marks the current page, and url for anything else.

hugo.toml
[[menus.main]]
  name = 'Posts'
  pageRef = '/posts'
  weight = 10
[[menus.main]]
  name = 'Tags'
  pageRef = '/tags'
  weight = 20

[[menus.footer]]
  name = 'About'
  pageRef = '/about'
  weight = 10
  • Header: the links sit beside the site name when they fit. Otherwise a menu button opens them in a full-screen panel, together with the language and color-scheme choices. An entry for the search page is skipped, because the header already has a search icon.
  • Footer: one centered row of small links above the © line. Up to five stay on one line on phones. Without entries, the row is left out.

On a multilingual site, define the menus per language: see Multilingual.

Site parameters

All of these go under [params].

ParameterDefaultDescription
descriptionnoneSite description: the home page’s meta description, the RSS channel description and the fallback for pages without one.
shortNamesite titleshort_name in the web app manifest.
hideMetafalseHide the date, reading time and word count on every page.

Author

ParameterDefaultDescription
author.namesite titleShown in the home intro, the © line and the copyright card. The author in metadata.
author.avatarnoneHome intro avatar. An image in assets/ is cropped square. A static/ path or a URL is used as it is.
author.biononeOne line under the name on the home page. Markdown.

Social links

Each [[params.social]] entry adds an icon link, with rel="me", to the home intro.

KeyDescription
nameThe icon: github, x, telegram, rss, or one of your own.
urlThe link.
titleAccessible name, such as GitHub.
hugo.toml
[params.author]
  name = 'Ada'
  avatar = 'avatar.png'
  bio = 'Writes about **type** and the web.'

[[params.social]]
  name = 'github'
  title = 'GitHub'
  url = 'https://github.com/you'
[[params.social]]
  name = 'mastodon'
  title = 'Mastodon'
  url = 'https://mastodon.social/@you'

Articles

ParameterDefaultDescription
article.toctrueTable of contents: beside the article on wide screens, behind a button on narrow ones.
article.tocMinHeadings2Show it only with at least this many headings.
article.tocMaxLevel3Deepest heading level listed. It always starts at h2.
article.readingTimetrueShow the reading time.
article.wordCounttrueShow the word count.
article.covertrueShow the cover image at the top of articles.
article.imageViewertrueOpen images in the full-screen viewer when clicked.

Set license to end every post in the main sections with a copyright card: title, link, author, date and license. The Showcase posts have one.

ParameterDefaultDescription
article.copyright.licensenoneLicense name, such as 'CC BY 4.0'.
article.copyright.urlnoneTurns the license name into a link.
article.copyright.notenoneAn extra line at the bottom. Markdown.
hugo.toml
[params.article.copyright]
  license = 'CC BY 4.0'
  url = 'https://creativecommons.org/licenses/by/4.0/'

The footer is centered, one item per line: the footer menu, © <since>–<this year> <author.name>, “Powered by Hugo & Icy”, the credit and your own text.

ParameterDefaultDescription
footer.copyrighttrueShow the © line.
footer.sinceyear of the earliest pageFirst year of the © range.
footer.poweredBytrueShow “Powered by Hugo & Icy”.
footer.textnoneAn extra line. Markdown.
footer.credit.prefixnoneText before the credit link, such as 'Hosted on'.
footer.credit.namenoneLink text, or the icon’s accessible name.
footer.credit.urlnoneThe credit link.
footer.credit.iconnoneAn icon shown instead of the name.
footer.credit.suffixnoneText after the credit link.
hugo.toml
[params.footer]
  since = 2019
  [params.footer.credit]
    prefix = 'Hosted on'
    name = 'Cloudflare'
    url = 'https://pages.cloudflare.com/'
    icon = 'cloudflare'

Speculation rules

Supporting browsers start loading a page of your site just before the reader clicks its link.

ParameterDefaultDescription
speculationRules.enabletrueTurn speculative loading on or off.
speculationRules.action'prefetch'prefetch or prerender.
speculationRules.eagerness'moderate'conservative, moderate, eager or immediate.

Links with rel="nofollow", a download attribute or a data-no-speculate attribute are never loaded ahead.

Front matter

Page-level keys. Where a site parameter does the same thing, the page key overrides it.

Display

KeyDescription
titlePage title.
descriptionOne sentence for search engines, social cards, search results and RSS. Section and tag pages also show it under the title. Defaults to the summary.
date, lastmodPublication date. A lastmod on a later day adds “Updated …”.
draftShows a “Draft” label. Drafts are left out of production builds.
tagsShown as #tag links under the metadata.
weightOrder in sections that are not main sections, like these docs.
tocShow or hide the table of contents.
hideMetaHide the date, reading time and word count.
imagesCover and social preview image. See Covers.
hideCoverKeep the cover off the page. It is still the social preview.
KeyDescription
originalfalse marks a repost and hides the card.
copyrightfalse hides the card.
licenseLicense for this post only.

Visibility

KeyDescription
hiddenInHomeListLeave out of the home page’s recent posts.
searchHiddenLeave out of the search index.
hiddenInRssLeave out of RSS feeds.
robotsNoIndexAdd noindex, nofollow and leave out of the sitemap.
sitemap.disableHugo’s own key: leave out of the sitemap only.
commentsfalse turns comments off.
analyticsfalse turns analytics off.

Special pages

KeyDescription
layoutsearch, friends or changelog. See Pages.
placeholderSearch page: the search field’s placeholder.
changesChangelog page: entries with date, title and an optional summary.
initialTag page: the letter the tag is filed under. See Tags.
schemaTypeStructured data type outside the main sections: WebPage by default, or AboutPage, ContactPage, ProfilePage, FAQPage. Posts are always BlogPosting.
protectedPassword protection. See Protected posts.

An about page, for example:

toml
+++
title = 'About'
schemaType = 'AboutPage'
toc = false
comments = false
+++

Errors

Icy ignores parameters it does not know. If a setting has no effect, check its spelling and its table. In TOML, every key after a [table] header belongs to that table, so top-level keys such as mainSections go before the first header.

A value Icy cannot use stops the build with a message that names it. For example:

  • a shortcode parameter that does not exist, or an image the shortcode cannot find;
  • a theme color that is not #rgb or #rrggbb, or a brand icon missing from assets/;
  • an unknown comments or analytics provider, or a missing required setting;
  • a protected page without a password, or an unsupported schemaType;
  • a friend without name or url, or a changelog entry without date or title.

Smaller problems, such as an invalid accent color or a non-square icon, only log a warning. Building with --panicOnWarning turns every warning into an error.

Elsewhere

These settings and parameters are documented with their feature.

KeySee
params.homeHome page
params.listLists
params.searchSearch
params.friendsFriends
params.livePhotoLive photos
params.repoRepository cards
params.commentsComments
params.analyticsAnalytics
params.images, params.schema, params.verificationSEO
enableRobotsTXT, params.robotsrobots.txt
params.rssRSS
params.styleAccent color
params.colorSchemeLight and dark
params.fontsFonts
params.brandSite icon and wordmark
languages, params.languageShortMultilingual
ignoreLogsNetwork access and the protected posts warning
cachesCaches