Convert Hugo content from TOML to YAML

Convert you Hugo content from TOML to YAML

When you are using Azure DevOps and go in the portal to your REPO and look at the content you will see that DevOps doesn’t recognize the TOML format. But when you switch it to YAML you will get a nice table at the start op de page like understanding.

YAML inDevOps
YAMLinDevOps

With the following command you can convert your existing content to YAML:

hugo convert toYAML --output content_as_yaml

And look if everything is right when this is the case you can rename your current content directory to content.old and the content_as_yaml to content.

In your config.toml you have to put the line:

MetaDataFormat = "yaml"

Commit your changes in your DevOps REPO and push them you your DevOps REPO and your good to go.

André van den Berg
André van den Berg
Consultant, Blogger, Speaker, Meetup/Event Attendee, Owner of MyStickerBox

André is widely interested, eager to learn and a DevOps enthusiast. He has experience with various projects in the field of lift and shift of on-premise environments to Azure Cloud, migrating databases and web servers of customers at suppliers to their own Azure environments together with the supplier. In addition, he also set up standard Bicep Blueprints for rolling out Azure resources in a consistent way at multiple customers who were managed by MSP. André likes to share his knowledge and is a real team player. In addition, he can also work well independently and is pleasant to deal with.