General configuration
This page covers site-wide display settings: the logo, dates, taxonomy terms, section titles, and list card images. To learn where configuration files go and how Hugo combines them with the theme defaults, read How Ananke configuration works. Every option is listed in the configuration reference.
Activate the contact form #
To add a contact form to a page, see Contact form.
Logo #
You can replace the title of your site in the top left corner of each page with your own logo. To do that put your own logo into the static directory of your website, and add the site_logo parameter to the site params in your config file. For example:
[params]
site_logo = "img/logo.svg"Main navigation menu #
To add entries to the header menu, from the configuration or from page front matter, see Menus.
Localize date format #
Dates of blog posts and single pages are rendered with the default date format commonly used in the USA and Canada. It is possible to specify a different format.
[params]
date_format = "2. January 2006"You can also use predefined date layouts, like :date_full, and it will output localized dates or times. See hugo’s documentation of the time.Format function for more details.
Show taxonomies on pages #
Ananke shows linked terms for the categories and tags taxonomies on single pages when they are set in page front matter. For example:
categories:
- Beginner
- Server
tags:
- cicd
- docker
- freeThe terms use Hugo’s taxonomy links, so the corresponding taxonomy must be enabled in your site configuration if you customise the default taxonomies.
Categories are shown by default. To hide the category terms on single pages site-wide, set show_categories to false in the ananke parameters:
[params.ananke]
show_categories = falseShow or hide dates on pages #
Ananke shows dates by default on single pages and summary cards, including recent posts on the home page. Use these settings in [params.ananke.pages] in your site configuration or under ananke in page front matter:
| Setting | Controls |
|---|---|
show_single_date | The date on a single page. |
show_summary_date | The date on summary cards, including recent posts on the home page. |
show_date | The shared fallback for both settings. Existing configurations continue to work. |
For example, show dates on single pages and hide them on cards across the site:
[params.ananke.pages]
show_single_date = true
show_summary_date = falseUse front matter to set the same behaviour for one page:
ananke:
show_single_date: true
show_summary_date: falseFor each date, Ananke uses the first boolean setting in this order:
- The specific page setting:
ananke.show_single_dateorananke.show_summary_date. - The shared page setting:
ananke.show_date. - The specific site setting:
params.ananke.pages.show_single_dateorparams.ananke.pages.show_summary_date. - The shared site setting:
params.ananke.pages.show_date. - The default: show the date.
Page settings include values inherited through cascade. A page’s own ananke map takes priority over the cascaded map, as explained below. Pages without a date never show one, even when a setting is true.
Show or hide section titles on summary cards #
Ananke shows the title of the section above the post title on compact summary cards on list pages. You can hide the section title on all cards by setting ananke.pages.show_section_title to false.
[params.ananke.pages]
show_section_title = falseYou can override this per page with front matter:
ananke:
show_section_title: trueThe image summary cards, which the home page uses for recent posts, do not show a section title.
Set dates and section titles for one section #
To hide dates on cards and section titles for all pages in one section, use cascade in the _index.md file of the section:
---
title: Posts
cascade:
params:
ananke:
show_summary_date: false
show_section_title: false
---The example keeps dates on single pages. Use show_single_date: false to hide those dates too, or show_date: false to hide both through the shared fallback.
[!NOTE] Hugo does not merge an
anankemap in the front matter of a page with theanankemap fromcascade. If a page sets its ownanankevalues, it must also set all the values fromcascadethat it needs.
Show images on list page cards #
By default, list pages render compact summary cards without images. You can opt in to image cards for list pages by enabling the ananke.pages.show_list_images parameter.
[params.ananke.pages]
show_list_images = trueWhen enabled, list pages use the same image summary card that is used for recent posts on the home page. Pages without a configured featured image still render without an image. Date display is controlled separately with ananke.pages.show_summary_date, with ananke.pages.show_date as its fallback.
See Page headers for information about configuring featured images.
Back to contents