I use PaperMod theme, the hugo server -D works, all the pages are loading, but when I do minification, it fails, I checked the html files they had valid json’s in those specified lines. Here is a header of the .md file that is failing, maybe that would give an idea. Although I removed all the content from the pages, to see if it’s from the content, and it still failed.
+++
title = ‘Generating functions’
description = “Introduction to generating functions and their applications in combinatorics”
date = 2024-05-12T13:26:47+02:00
tags = [“Math”, “Combinatorics”]
draft = false
+++
Here are the logs.
❯ hugo --gc --minify
Start building sites …
hugo v0.125.7+extended darwin/arm64 BuildDate=2024-05-08T14:46:24Z VendorInfo=brew
ERROR failed to process “/blog/introduction/index.html”: “/var/folders/sm/z5kfpmtd5pvd31nc2605hs0h0000gn/T/hugo-transform-error2460583693:89:40”: expected comma character or an array or object ending on line 89 and column 40
12: {
^
ERROR failed to process “/blog/matroids/index.html”: “/var/folders/sm/z5kfpmtd5pvd31nc2605hs0h0000gn/T/hugo-transform-error1141656666:89:40”: expected comma character or an array or object ending on line 89 and column 40
12: {
^
Total in 36 ms
Error: error building site: render: failed to render pages: failed to process “/blog/generatingfunctions/index.html”: “/var/folders/sm/z5kfpmtd5pvd31nc2605hs0h0000gn/T/hugo-transform-error3043238659:86:40”: expected comma character or an array or object ending on line 86 and column 40
12: {
^
did anyone had similar issues?
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.