I don’t have any JSON files in my project which would be minified. As you can see, it’s style.css that’s being turned into .json somehow. style.css is produced by hugo resources (from many different css files). resource is something hugo generates, which I was told using --ignoreCache would ignore.
{{ $base := resources.Get "base.css" }}
{{ $custom := resources.Get "custom.css" }}
{{/* $fa := resources.Get "font-awesome.css" */}}
{{ if hugo.IsProduction }}
{{ $css := slice $base $custom | resources.Concat "css/style.css" | resources.Minify | resources.PostCSS | resources.PostProcess }}
<link href="{{ $css.Permalink }}" rel="stylesheet"/>
{{ else }}
<link href="{{ $base.Permalink }}" rel="stylesheet"/>
<link href="{{ $custom.Permalink }}" rel="stylesheet"/>
<!--<link href="{{/* $fa.Permalink */}}" rel="stylesheet"/>-->
{{ end }}
I don’t understand quite clearly what’s happening with the JSON error, and exactly which file is hugo complaining about? I’ve looked at all the JSON I have in my project, json+ld data, any other data, and it’s all valid json.
The only json data file I have is /data/read/top.json which I got from Google Analytics API to prepare for a Most read articles section of the month for my site. I verified it at https://jsonformatter.curiousconcept.com/ as valid json.
[
{
"url": "/psychedelics/psilocybin/do-shrooms-show-up-on-drug-test/",
"title": "Do Shrooms Show Up On Drug Test?",
"views": 18299
},
{
"url": "/psychedelics/psilocybin/shroom-dose-calculator/",
"title": "Shroom Dose Calculator",
"views": 9639
},
{
"url": "/psychedelics/lsd/does-lsd-show-up-on-drug-test-guide-to-lsd-drug-testing/",
"title": "Does LSD Show Up On Drug Test? Guide to LSD Drug Testing!",
"views": 7729
},
{
"url": "/psychedelics/microdosing/how-to-prepare-a-psilocybin-mushroom-microdose/",
"title": "How to Prepare a Psilocybin Mushroom Microdose",
"views": 6941
},
{
"url": "/psychedelics/microdosing/microdose-mushrooms-in-7-easy-steps/",
"title": "Microdose Mushrooms in 7 Easy Steps",
"views": 3285
},
{
"url": "/psychedelics/lsd/9-facts-about-lsd-everyone-should-know/",
"title": "9 Facts About LSD Everyone Should Know",
"views": 2638
},
{
"url": "/psychedelics/psilocybin/three-things-to-know-about-psilocybin-mushrooms/",
"title": "Three Things To Know About Psilocybin Mushrooms",
"views": 2366
},
{
"url": "/psychedelics/microdosing/best-microdosing-schedule-by-dr.-james-fadiman/",
"title": "Best Microdosing Schedule By Dr. James Fadiman",
"views": 2193
},
{
"url": "/psychedelics/microdosing/microdose-acid-in-7-easy-steps/",
"title": "Microdose Acid in 7 Easy Steps",
"views": 1808
},
{
"url": "/psychedelics/psilocybin/do-shrooms-show-up-on-drug-test/",
"title": "Do Shrooms Show Up On Drug Test?",
"views": 1179
},
{
"url": "/psychedelics/microdosing/how-to-prepare-a-psilocybin-mushroom-microdose/",
"title": "How to Prepare a Psilocybin Mushroom Microdose",
"views": 954
},
{
"url": "/psychedelics/microdosing/microdosing-benefits-of-lsd-and-psilocybin-mushrooms/",
"title": "Microdosing Benefits of LSD and Psilocybin Mushrooms",
"views": 951
},
{
"url": "/psychedelics/microdosing/everything-you-need-to-know-about-microdosing-4-aco-dmt/",
"title": "Everything You Need To Know About Microdosing 4-AcO-DMT",
"views": 903
},
{
"url": "/psychedelics/lsd/does-lsd-show-up-on-drug-test-guide-to-lsd-drug-testing/",
"title": "Does LSD Show Up On Drug Test? Guide to LSD Drug Testing!",
"views": 659
},
{
"url": "/psychedelics/microdosing/how-to-microdose-acid-and-magic-mushrooms/",
"title": "How to Microdose Acid and Magic Mushrooms?",
"views": 628
},
{
"url": "/psychedelics/microdosing/microdose-4-aco-dmt-in-7-easy-steps/",
"title": "Microdose 4-AcO-DMT in 7 Easy Steps!",
"views": 618
},
{
"url": "/psychedelics/psilocybin/three-things-to-know-about-psilocybin-mushrooms/",
"title": "Three Things To Know About Psilocybin Mushrooms",
"views": 529
},
{
"url": "/psychedelics/salvia/5-important-tips-for-new-salvia-users/",
"title": "5 Important Tips For New Salvia Users - Best Resources For The Responsible Use Of",
"views": 134
}
]
Other than that, there is package.json and manifest.json which are also valid. package.json is not used by hugo, but by node. And manifest.json is not a resource to be minified or processed, just a file in /public/
It throws these errors, however, the site is still generated and minified.
I mean if during minification --minify in Hugo, the css resource is converted to JSON .json file, then even that is peculiar because https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fwww.psychedelicsdaily.com%2F reports my css as valid. No errors.