HUGO-CONVERT-TOJSON(1)

✨ HUGO-CONVERT-TOJSON(1) ✨

okay so this is a page straight out of the Hugo Manual bestie, and it's all about one tiny little command that does one very specific glow-up. let's get into it πŸ’…


🌸 NAME 🌸

hugo-convert-toJSON β€” convert front matter to JSON

like, the whole entire vibe is "front matter, but make it JSON" ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

hugo convert toJSON [flags] [args]

that's it. that's the whole thing. flags go here, args go there, slay πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so toJSON takes all the front matter in your content directory and converts it to use JSON for the front matter. all of it. every last file. no cap.

that's literally the whole job. it's giving "one task, done well" main character energy πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help[=false] β€” help for toJSON. it's the "wait what does this do again" button 🫢

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

these are the hand-me-downs from the parent command, and honestly they ate πŸ’€

  • --clock="" β€” set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
  • --config="" β€” config file (default is hugo.yaml|json|toml)
  • --configDir="config" β€” config dir
  • -d, --destination="" β€” filesystem path to write files to
  • -e, --environment="" β€” build environment
  • --ignoreVendorPaths="" β€” ignores any _vendor for module paths matching the given Glob pattern
  • --logLevel="" β€” log level (debug|info|warn|error)
  • --noBuildLock[=false] β€” don't create .hugo_build.lock file
  • -o, --output="" β€” filesystem path to write files to
  • --quiet[=false] β€” build in quiet mode
  • -M, --renderToMemory[=false] β€” render to memory (mostly useful when running the server)
  • -s, --source="" β€” filesystem path to read files relative from
  • --themesDir="" β€” filesystem path to themes directory
  • --unsafe[=false] β€” enable less safe operations, please backup first
⚠️ ok bestie real talk for a sec: that last one, --unsafe, literally says "please backup first" in the manpage. that's not me being dramatic, that's Hugo being dramatic. back your stuff up before you go enabling less safe operations, fr fr 😭

πŸ’œ SEE ALSO πŸ’œ

  • hugo-convert(1) β€” the parent command, the original, the blueprint. go read it, iykyk 🧚

Hugo 0.169.0 πŸ¦‹ Oct 2026 β€” and that's the whole page bestie!! written by the Hugo girlies, dated Oct 2026, shipped as Hugo 0.169.0. go convert some front matter, you're gonna do amazing πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from