Kenny
March 18, 2025, 9:57pm
1
I keep making changes to my posts because it keeps failing when i try to deploy it! the first few lines of my .MD files are all the same, and they all have the same information except “datePublished”, and title. I’m pretty sure i’m missing something i just dont know what im missing.
edit: im going to add the github link to my repository. GitHub - nonbinarybyte/blog.nonbinarybyte.com
edit 2: im new to hugo, but i have 5 years of webdev under my belt.
edit 3: i do also wanna mention i HAVE read the docs
title = "My Ultimate Blankets Guide"
datePublished = "2025-03-18T21:30+4:00"
tags = [crochet,DIY,crafts,crochet guide,crochet tutoriaL,free crochet guide,free,free pattern,free crochet pattern,patterns,2025,March 2025']
draft = false
+++```
irkode
March 18, 2025, 11:10pm
2
the build on github failed with:
Error: error building site: process: readAndProcessContent: “/home/runner/work/blog.nonbinarybyte.com/blog.nonbinarybyte.com/content/posts/Blog Intro.md:4:14”: unmarshal failed: toml: incomplete number
lets check line 4:14 in the mentioned file:
+++
title = "My Intro Post"
datePublished = "2025-03-14T14:30+4:00"
tags = [2025,March 2025,Promotion,Updates,Promo,Other,Random Posts]
draft = false
+++
your TOML front matter is broken:
tags in hugo is an array of strings. but 2024 in toml is a number and March is not a string.
enclose every tag in double quotes.
tags = [ "2024", "March", ...]
update per comment from @jmooring below:
checked the datePublished filed in the themes partial and it’s a custom files to handle structured json .
so that’s fine
removed irrelevant
for the predefined date fields these should be equivalent. resulting in a time value.
publishDate = 2025-03-14T14:30+4:00
publishDate = "2025-03-14T14:30+4:00"
but as stated before your datePublish is a custom string
these errors will also occur when building locally. i’d recommend to build locally before pushing to github
To clarify, quoted dates in TOML are fine. With the four predefined front matter date fields, quoted TOML dates are cast to time.Time
values just like YAML and JSON dates.
Where unquoted TOML dates are valuable is with custom front matter fields; you can safely use a where
clause to narrow a page collection.
1 Like
Kenny
March 19, 2025, 11:58am
4
thank you! this solved my issue
system
Closed
March 21, 2025, 11:58am
5
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.