This document outlines all available frontmatter parameters for the Sans Hugo theme.
Basic Parameters Title and Date YAML
Copy
1
2
3
4
---
title : "Your Post Title"
date : 2024-01-15T10:30:00-07 : 00
---
title : The title of your post or page (required)date : Publication date in ISO 8601 format (required for posts)Page Type YAML
Copy
1
type : "page" # or "post"
type: "page" : Renders as a simple page without metadata (date, tags, reading time, etc.) or with the previous/next post at the end.type: "post" or no type: Renders as a full blog post with all metadataCover Image Configuration Configure cover images for your posts using the cover parameter:
YAML
Copy
1
2
3
4
5
6
cover :
image : "cover.jpg"
alt : "Alternative text description"
caption : "Photo by John Doe"
imageDisplay : true
captionDisplay : true
Example Usage Full cover with caption:
YAML
Copy
1
2
3
4
cover :
image : "featured.jpg"
alt : "Mountain landscape at sunset"
caption : "Photo taken at Rocky Mountain National Park"
Hide cover image:
YAML
Copy
1
2
3
cover :
image : "cover.jpg"
imageDisplay : false
Show image without caption:
YAML
Copy
1
2
3
4
cover :
image : "cover.jpg"
caption : "This caption won't be displayed"
captionDisplay : false
showFrontMatter: true : Display all metadata (tags, categories, date, word count, reading time)showFrontMatter: false : Hide all metadata for this postNote: This parameter overrides individual metadata settings below. If not specified, it defaults to the site-wide configuration in config.toml.
Taxonomies Add taxonomical information to organize your content:
YAML
Copy
1
2
3
tags : [ "hugo" , "web-development" , "tutorial" ]
categories : [ "Technology" , "Programming" ]
authors : [ "John Doe" ]
tags : List of tags for the postcategories : List of categories for the postauthors : List of authors for the postTable of Contents toc: true : Enable table of contents for this posttoc: false or omit: No table of contents displayedThe table of contents is automatically generated from your heading structure.
Site-Wide Settings The following parameters are typically configured in your config.toml file but can be overridden per post if needed:
YAML
Copy
1
2
3
4
5
6
showTags : true
showCategories : true
showAuthors : true
showDate : true
showWordCount : true
showReadingTime : true
Taxonomy Clouds YAML
Copy
1
2
3
showTagCloud : true
showCategoryCloud : true
showAuthorCloud : true
These control the sidebar taxonomy clouds that appear on desktop views.
Complete Example Here’s a full example with all available frontmatter options:
YAML
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
title : "Building Modern Websites with Hugo"
date : 2024-11-27T14:30:00-07 : 00
tags : [ "hugo" , "static-site-generator" , "web-development" ]
categories : [ "Technology" , "Tutorials" ]
authors : [ "Jane Smith" ]
# Cover image configuration
cover :
image : "hugo-website.jpg"
alt : "Hugo logo with website mockups"
caption : "Hugo makes building websites fast and fun"
imageDisplay : true
captionDisplay : true
# Display options
showFrontMatter : true
toc : true
# Page type (use "page" for documentation, "post" for blog posts)
type : "post"
---
Your content starts here...
Quick Reference Minimal Post YAML
Copy
1
2
3
4
---
title : "My Post"
date : 2024-11-27
---
Simple Page (No Metadata) YAML
Copy
1
2
3
4
---
title : "About"
type : "page"
---
Blog Post with Cover YAML
Copy
1
2
3
4
5
6
7
8
9
---
title : "My Article"
date : 2024-11-27
tags : [ "blogging" ]
cover :
image : "cover.jpg"
caption : "A beautiful cover image"
toc : true
---
Important Notes Page Bundles : Cover images must be placed in the same directory as your markdown file (page bundle structure)Type Behavior : Setting type: "page" completely bypasses metadata display, regardless of other settingsDefault Values : Most boolean parameters default to true or follow site-wide configurationTaxonomy Clouds : Displayed only on desktop views (hidden on screens < 1300px)Reading Time : Automatically calculated based on word count and site-configured reading speed