Content Types and Archetypes
Ananke builds on Hugo’s standard content model. This page explains the kinds of content you will create and the front matter each one needs. For the full list of front matter keys, see Frontmatter.
Pages #
A page is a single standalone document, such as an About or Contact page. Create
one as a file directly under content/:
Images
- Static images
- Images in Markdown
- Page bundle images
- Featured images
- Social sharing images
- Alt text
- Common path mistakes
This page explains the ways to add images to an Ananke site and the paths each one uses.
Static images #
Files in your project’s static/ directory are copied to the site root as-is.
A file at static/images/example.jpg is served at /images/example.jpg:
my-site/
└── static/
└── images/
└── example.jpg # available at /images/example.jpgReference static images with a leading / (note: no static in the URL).
Summaries and Reading Time
- Automatic summaries
- The manual summary divider
- A custom summary in front matter
- The read more link
- Reading time and word count
- How list pages use summaries
On list pages and the homepage, Ananke shows a short summary of each post rather than its full content. This page explains where that summary comes from and how to control it.
Automatic summaries #
If you do nothing, Hugo generates the summary automatically from the start of the content (by default the first 70 words). This needs no configuration and works for every page.
The manual summary divider #
To choose exactly where the summary ends, add a divider in your content. Hugo uses everything before it as the summary:
This paragraph is the summary shown on list pages.
This and everything after it is only shown on the full page.A custom summary in front matter #
To write a summary that is independent of the body text, set summary in front
matter:
Taxonomies
- Default taxonomies
- Adding terms to content
- Term list and terms pages
- Where taxonomy links appear
- Changing or adding taxonomies
Taxonomies group your content by shared terms. Ananke supports Hugo’s two default taxonomies — tags and categories — out of the box.
Default taxonomies #
Hugo enables tags and categories by default, so you do not need to configure
anything to use them. If you want to declare them explicitly (for example to add
or rename taxonomies), set them in your configuration:
Calculate and show reading time
The reading time displayed in layouts/_default/single.html can now be configured via a reading_speed parameter, instead of always using Hugo’s computed .ReadingTime. (GitHub)
The theme still only shows reading time when
show_reading_time = trueis enabled (page param or section param). (GitHub)The displayed value is now computed like this:
Frontmatter
- Using a canonical url
- Common Options
- Example: Disabling Breadcrumbs
- Example: Custom Layout
- Example: Using
linktitle - Defaults & Fallbacks
- Notes
Using a canonical url #
If you want to publish content that is already published on a different site you need to reference a canonical URL of the original content. By defining the canonicalUrl in the front matter definition the canonical url is set in the headers.
General
Author #
Add an author to a page by setting the author key in its front matter. The author is shown below the title on single pages and on image summary cards.
---
title: My First Post
author: Jane Doe
---To set a default author for the whole site, add author to your site parameters. Page front matter overrides the site default.