# \#frontmatter

**URL:** https://discourse.gohugo.io/tag/frontmatter/117.md

[Latest](https://discourse.gohugo.io/latest.md) · [Categories](https://discourse.gohugo.io/categories.md) · [Tags](https://discourse.gohugo.io/tags.md)

---

## [Bash script checker to prevent drafts from being published accidentally](https://discourse.gohugo.io/t/bash-script-checker-to-prevent-drafts-from-being-published-accidentally/57238)

<div class="topic-metadata">

**Author:** [@ES7313](https://discourse.gohugo.io/u/ES7313)\
**Replies:** 2\
**Last updated:** [June 9, 2026, 3:08am UTC](https://discourse.gohugo.io/t/bash-script-checker-to-prevent-drafts-from-being-published-accidentally/57238 "2026-06-09T03:08:01Z")

</div>

I accidentally removed draft = true line in the front matter which caused the unfinished post being built and deployed live. I couldn’t find a way to stop Hugo from publishing content that doesn’t have a draft parameter,…

---

## [How to replace encode html in \_ by frontmatter url](https://discourse.gohugo.io/t/how-to-replace-encode-html-in-by-frontmatter-url/56637)

<div class="topic-metadata">

**Author:** [@Xorfor](https://discourse.gohugo.io/u/Xorfor)\
**Replies:** 2\
**Last updated:** [January 29, 2026, 9:19pm UTC](https://discourse.gohugo.io/t/how-to-replace-encode-html-in-by-frontmatter-url/56637 "2026-01-29T21:19:00Z")

</div>

I have a structure like: content + abc + def + ghi + xyz + 1 + 2 + jkl + xyz + 3 + 4 and I want to get: public + abc + ghi + 1 + 2 + …

---

## [How can I specify that an org-mode file should not be rendered?](https://discourse.gohugo.io/t/how-can-i-specify-that-an-org-mode-file-should-not-be-rendered/55768)

<div class="topic-metadata">

**Author:** [@petrichor](https://discourse.gohugo.io/u/petrichor)\
**Replies:** 1\
**Last updated:** [August 22, 2025, 5:45pm UTC](https://discourse.gohugo.io/t/how-can-i-specify-that-an-org-mode-file-should-not-be-rendered/55768 "2025-08-22T17:45:45Z")

</div>

I’m trying to figure out how to include an org-mode file as a page resource in a bundle, without Hugo trying to render that file, in a site that also has some content in org-mode files that should be rendered as normal. …

---

## [How does fronmatter property "layout" relate to layouts subdirectories?](https://discourse.gohugo.io/t/how-does-fronmatter-property-layout-relate-to-layouts-subdirectories/55547)

<div class="topic-metadata">

**Author:** [@roblaing](https://discourse.gohugo.io/u/roblaing)\
**Replies:** 6\
**Last updated:** [August 4, 2025, 9:53am UTC](https://discourse.gohugo.io/t/how-does-fronmatter-property-layout-relate-to-layouts-subdirectories/55547 "2025-08-04T09:53:55Z")

</div>

I’m trying to create different “page.html” templates for different sections. Starting with my about page, I added {“layout”: “about”,…}and then created a subdirectory in my layouts folder layouts/page/about.htmlwhich wo…

---

## [Change elements(text) in hugo.toml and frontmatter with javascript](https://discourse.gohugo.io/t/change-elements-text-in-hugo-toml-and-frontmatter-with-javascript/55131)

<div class="topic-metadata">

**Author:** [@mrbalsi](https://discourse.gohugo.io/u/mrbalsi)\
**Replies:** 1\
**Last updated:** [June 23, 2025, 3:12pm UTC](https://discourse.gohugo.io/t/change-elements-text-in-hugo-toml-and-frontmatter-with-javascript/55131 "2025-06-23T15:12:57Z")

</div>

Hello again. I am using the Lightbi Theme and would like to change text on the site, depending on the theme (dark or light) using javascript, similar to this example: How To Toggle Text However, the texts in question a…

---

## [Specify a background image in the frontmatter in lightbi theme](https://discourse.gohugo.io/t/specify-a-background-image-in-the-frontmatter-in-lightbi-theme/55042)

<div class="topic-metadata">

**Author:** [@mrbalsi](https://discourse.gohugo.io/u/mrbalsi)\
**Replies:** 5\
**Last updated:** [June 13, 2025, 10:24am UTC](https://discourse.gohugo.io/t/specify-a-background-image-in-the-frontmatter-in-lightbi-theme/55042 "2025-06-13T10:24:46Z")

</div>

Hello again. I am tinkering around with the lightbi-theme (Lightbi) It uses preview cards featuring images, which are specified in the frontmatter of the respective file in the content folder. What I am looking to do i…

---

## [Front Matter Formatting](https://discourse.gohugo.io/t/front-matter-formatting/54943)

<div class="topic-metadata">

**Author:** [@leebrownhill](https://discourse.gohugo.io/u/leebrownhill)\
**Replies:** 2\
**Last updated:** [June 3, 2025, 2:58pm UTC](https://discourse.gohugo.io/t/front-matter-formatting/54943 "2025-06-03T14:58:38Z")

</div>

Hi all I have what feels like a bit of a silly question, but alas, here I am. :blush: I want to tidy up my front matter declarations—purely from an aesthetic point of view. However, unsurprisingly, things break as soo…

---

## [Content Adaptor To Update Existing Markdown Key Value Pairs](https://discourse.gohugo.io/t/content-adaptor-to-update-existing-markdown-key-value-pairs/54942)

<div class="topic-metadata">

**Author:** [@saitor](https://discourse.gohugo.io/u/saitor)\
**Replies:** 4\
**Last updated:** [June 2, 2025, 12:17pm UTC](https://discourse.gohugo.io/t/content-adaptor-to-update-existing-markdown-key-value-pairs/54942 "2025-06-02T12:17:26Z")

</div>

I need to calculate a few Frontmatter keys at build time. Background: I need to calculate certain frontmatter key values at build time so they can be referenced across multiple pages. For example, I’d like to: Turn a…

---

## [TOML frontmatter, can't end table, it puts everything after the table in the table](https://discourse.gohugo.io/t/toml-frontmatter-cant-end-table-it-puts-everything-after-the-table-in-the-table/54103)

<div class="topic-metadata">

**Author:** [@Norrun](https://discourse.gohugo.io/u/Norrun)\
**Replies:** 8\
**Last updated:** [March 26, 2025, 8:53pm UTC](https://discourse.gohugo.io/t/toml-frontmatter-cant-end-table-it-puts-everything-after-the-table-in-the-table/54103 "2025-03-26T20:53:11Z")

</div>

landings = \["general"\] \[landing\_weights\] general = 1 # Table should have ended. thumbnail = "images/projects/underscoped.png" image = "images/projects/underscoped.png" Is there a way to fix this or do I have to wait t…

---

## [How to validate frontmatter?](https://discourse.gohugo.io/t/how-to-validate-frontmatter/54085)

<div class="topic-metadata">

**Author:** [@ashishb](https://discourse.gohugo.io/u/ashishb)\
**Replies:** 2\
**Last updated:** [March 26, 2025, 2:36am UTC](https://discourse.gohugo.io/t/how-to-validate-frontmatter/54085 "2025-03-26T02:36:33Z")

</div>

How do I validate my website’s frontmatter to ensure No unknown keys - this can catch typo e.g. “alises” instead of “aliases” No incorrect types - e.g. string instead of array of string for “aliases”

---

## [Using Hugo After 2 Years!](https://discourse.gohugo.io/t/using-hugo-after-2-years/53884)

<div class="topic-metadata">

**Author:** [@yousafblogger](https://discourse.gohugo.io/u/yousafblogger)\
**Replies:** 3\
**Last updated:** [March 10, 2025, 6:44pm UTC](https://discourse.gohugo.io/t/using-hugo-after-2-years/53884 "2025-03-10T18:44:39Z")

</div>

I’m using hugo after 2 years, and so much has changed. I see that kind in front matter is no longer supported! I want to use it to define it as a term, because I don’t want to make folders for each category or tag. If t…

---

## [Specifying a background image for a given page in the frontmatter](https://discourse.gohugo.io/t/specifying-a-background-image-for-a-given-page-in-the-frontmatter/52854)

<div class="topic-metadata">

**Author:** [@mrbalsi](https://discourse.gohugo.io/u/mrbalsi)\
**Replies:** 3\
**Last updated:** [December 22, 2024, 1:37pm UTC](https://discourse.gohugo.io/t/specifying-a-background-image-for-a-given-page-in-the-frontmatter/52854 "2024-12-22T13:37:10Z")

</div>

Hello there, I’m quite new to hugo and also quite clueless about html, css etc. So good prerequisits you see :wink: Anyways, I managed to get an image working as a background, by adding a body:after tag in the style.css…

---

## [Front matter not rendered (hugo-coder)](https://discourse.gohugo.io/t/front-matter-not-rendered-hugo-coder/52771)

<div class="topic-metadata">

**Author:** [@snowflake](https://discourse.gohugo.io/u/snowflake)\
**Replies:** 7\
**Last updated:** [December 16, 2024, 3:51pm UTC](https://discourse.gohugo.io/t/front-matter-not-rendered-hugo-coder/52771 "2024-12-16T15:51:33Z")

</div>

Hello everyone, I’m currently doing a simple blog using Hugo-Coder theme My issue is i am not able to makes the font matter to render. what i mean is i want to display some informations just behind the title such as p…

---

## [Invalid front matter: Bool ERROR](https://discourse.gohugo.io/t/invalid-front-matter-bool-error/51848)

<div class="topic-metadata">

**Author:** [@Rose\_Chege](https://discourse.gohugo.io/u/Rose_Chege)\
**Replies:** 1\
**Last updated:** [October 7, 2024, 2:03pm UTC](https://discourse.gohugo.io/t/invalid-front-matter-bool-error/51848 "2024-10-07T14:03:07Z")

</div>

I have ERROR invalid front matter: published: %!!(MISSING)s(bool=true) I don’t know where the problem is with Hugo 0.136.0. This is the front matter I’m using: --- layout: blog published: true status: publish url: /ab…

---

## [Cascading to list pages](https://discourse.gohugo.io/t/cascading-to-list-pages/51424)

<div class="topic-metadata">

**Author:** [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Replies:** 2\
**Last updated:** [September 3, 2024, 4:03pm UTC](https://discourse.gohugo.io/t/cascading-to-list-pages/51424 "2024-09-03T16:03:56Z")

</div>

I have the following folder structure: content/foo/\_index.md content/foo/bar1/index.md content/foo/bar2/\_index.md content/foo/bar2/something-else.md there is a cascade in foo/\_index.md cascade: params: config: …
