Skip to main content

Front Matter

Guest Author
3 min read

All theme parameters can be overridden per-page using front matter. This allows fine-grained control over how each page is displayed.

Basic Parameters #

ParameterTypeDescription
titlestringPage title (used in browser tab and headings)
datedatePublish date
lastmoddateLast modified date
draftbooleanMark as draft (hidden in production)
descriptionstringPage description (meta tag and social cards)
summarystringCustom summary for article cards
tagsarrayPage tags
categoriesarrayPage categories
keywordsarraySEO keywords
weightintegerSort order for list pages

Layout Parameters #

ParameterTypeDescription
layoutstringOverride layout template
typestringContent type (determines lookup path)

Available Layouts #

  • single - Default article layout with optional TOC sidebar
  • list - Archive/list page with article cards
  • about - About page layout

Display Overrides #

Override any params.article setting per-page:

---
title: "My Article"
showTableOfContents: false
showReadingTime: false
showDate: false
showAuthorHeader: false
showAuthorFooter: false
showWordCount: true
showTaxonomies: true
showPagination: false
showHeadingAnchors: false
showDraftLabel: true
showDateUpdated: true
---

Add featured images that appear on article cards:

---
title: "My Article"
featureImage: "image.jpg"
featureImageAlt: "Description of image"
---

Place the image in the same directory as your content file (page bundle) or reference a path in static/.

Table of Contents #

The TOC appears automatically for articles over 400 words when showTableOfContents: true (the default). The TOC displays as a sticky sidebar on larger screens and is hidden on mobile.

To disable for a specific page:

---
showTableOfContents: false
---

Draft Posts #

Draft posts are hidden in production but visible during development:

---
draft: true
---

Build with drafts using:

hugo --buildDrafts
hugo server --buildDrafts

When displayed, draft posts show a “Draft” badge (controlled by showDraftLabel).

Author Override #

Override the site-wide author for a specific page:

---
author:
  name: "Guest Author"
  headline: "Guest Writer"
  image: "guest-avatar.jpg"
---

SEO Parameters #

ParameterTypeDescription
descriptionstringMeta description
keywordsarrayMeta keywords
robotsstringRobots meta directive
---
description: "A detailed guide to configuring Shiloh"
keywords: ["hugo", "theme", "configuration"]
robots: "noindex, nofollow"
---

Open Graph Overrides #

ParameterTypeDescription
imagesarrayOpen Graph images (up to 6)
---
images:
  - "og-image.jpg"
  - "og-image-2.jpg"
---

Section Index Pages #

For _index.md files, additional options control section listing behavior:

---
title: "Blog Posts"
description: "All articles and tutorials"
cascade:
  showReadingTime: true
  showDate: true
---

The cascade option applies settings to all pages in the section.

Complete Example #

---
title: "Getting Started with Shiloh"
date: 2024-01-15
lastmod: 2024-01-20
draft: false
description: "Learn how to set up and customize the Shiloh Hugo theme"
summary: "A beginner's guide to the Shiloh theme"
tags: ["tutorial", "hugo", "themes"]
categories: ["Documentation"]
keywords: ["hugo theme", "shiloh", "getting started"]
featureImage: "cover.jpg"
featureImageAlt: "Shiloh theme screenshot"
showTableOfContents: true
showReadingTime: true
showWordCount: true
showTaxonomies: true
showAuthorHeader: true
showAuthorFooter: true
showDate: true
showDateUpdated: true
---
Author
Guest Author - Guest Writer