I am not sure what’s wrong with me when exec the command that as below:
C:\Users\senhui.li\Documents\GitRepos\tmp\hugo-test>hugo convert toYAML -h
toYAML converts all front matter in the content directory
to use YAML for the front matter.
Usage:
hugo convert toYAML [flags] [args]
Flags:
-h, --help help for toYAML
Global Flags:
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
--config string config file (default is hugo.yaml|json|toml)
--configDir string config dir (default "config")
-d, --destination string filesystem path to write files to
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
-o, --output string filesystem path to write files to
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
--themesDir string filesystem path to themes directory
--unsafe enable less safe operations, please backup first
C:\Users\senhui.li\Documents\GitRepos\tmp\hugo-test>dir
驱动器 C 中的卷没有标签。
卷的序列号是 8063-710E
C:\Users\senhui.li\Documents\GitRepos\tmp\hugo-test 的目录
2025/05/18 17:26 <DIR> .
2025/05/18 17:26 <DIR> ..
2025/05/18 17:26 <DIR> archetypes
2025/05/18 17:26 <DIR> assets
2025/05/18 17:26 <DIR> content
2025/05/18 17:26 <DIR> data
2025/05/18 17:26 83 hugo.toml
2025/05/18 17:26 <DIR> i18n
2025/05/18 17:26 <DIR> layouts
2025/05/18 17:26 <DIR> static
2025/05/18 17:26 <DIR> themes
1 个文件 83 字节
10 个目录 251,589,152,768 可用字节
C:\Users\senhui.li\Documents\GitRepos\tmp\hugo-test>hugo convert toYAML --unsafe
processing 0 content files
C:\Users\senhui.li\Documents\GitRepos\tmp\hugo-test>hugo convert toYAML --unsafe --config hugo.toml
processing 0 content files
And that found the history topic howto-convert-your-front-matter-from-toml-to-yaml discuss abouth the hugo convert
CLI design, seems this CLI just support content files. So is there others needs convert the config synatx to YAML. How do you solved this request.