-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Content Frontmatter
Note
Work in progress. The information on this page is a copy paste result from old notes and documentation. Needs rewrite.
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.
canonicalUrl: https://mydomain.com/path-to-the-oringinal-content/
Key | Type | Description | Default |
---|---|---|---|
title |
string | The title shown on the page and in metadata | Required |
linktitle |
string | Overrides the page title in menus and breadcrumbs | Uses title
|
summary |
string | Custom page summary shown in list views | Auto-generated |
description |
string | Meta description for SEO and previews | Empty |
disableBreadcrumbs = true
This removes the breadcrumb trail from a single page layout.
layout = "project"
This loads layouts/_default/project.html
or a corresponding type fallback.
title = "My Long Page Title"
linktitle = "Short Name"
This helps keep breadcrumbs and menus short while using a full title on the page.
Most fields are optional. When not set:
-
linktitle
falls back totitle
-
layout
is inferred fromtype
or content section -
summary
is generated from the first paragraph -
description
may be empty unless manually added -
disableBreadcrumbs
isfalse
unless set
These values apply to all content types and can be overridden per page. Consider using Archetypes for pre-filled front matter in your content structure.
Tip
We offer two sample repositories for Ananke's use. Feel free to clone them and play around to test out features described here:
- gohugo-theme-ananke-template-mod --- Hugo Module installation (preferred)
- gohugo-theme-ananke-template-submod --- Git Submodule installation (legacy method)
- Home
- Installation (notes)
- Configuration (notes)
- Content (notes)
- Design and customization
- FAQ