in my i18n/ folder i have TOML files for all supported languages …
i want to change permanently to json files - i need a script or a bash command to convert toml->josn
thanks for the help
PS when i deleted *.toml then Hugo automatically takes *.json or do i have to config that somewhere?
This is not a forum for bash script file conversions.
Please search the UNIX / Linux forums and/or StackOverflow.
Hugo config can be in toml, json or yaml. If you provide a json it should be picked up without doing anything.
Hugo has the CLI command
hugo convert that is meant for converting the front matter format of content files.
You may try and see if it suits your use case, however you would still need to change the file extension to JSON manually.
If you need to convert more than one or two files (e.g., an
i18n directory with 20 toml files), you might consider https://github.com/sclevine/yj.
This topic was automatically closed after 19 hours. New replies are no longer allowed.