I have a Hugo site with translations per file, using page bundles.
So the About page looks like this:
- about
- about-image.jpg
- index.en.md
- index.nl.md
- index.fr.md
The problem is that I have to repeat the non-i18n front matter in all of the .md files.
For example, date, tags, et cetera.
Is there a way in hugo to define the (basic) front matter once, and have translations only contain overrides needed for i18n?
You can define the default language in the config file of the site. Then, you set the strings that do not need to be translated only into the translation file of the default language, and you do not define them in the other files.
As the translations are missing, Hugo will default to the default language (if defined in the config file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With