[SOLVED] Same Front Matter for multilingual pages

Hi, I have the following setup:

    - _index.md
    - index.es.md


title: "Some title"
color: "blue"
description: "Some description."

othertitle: "othertitle"
otherdescription: "otherdescription"
button: "Button"
video: "Watch video"


title: "Some title
color: "blue"
description: "Some description."

othertitle: "Spanish title"
otherdescription: "Spanish description"
button: "Spanish"
video: "Spanish"

In my index.html I want to do the following:

    <header><h1>{{ .Params.othertitle }}</h1>
    <article><h2>{{ .Params.otherdescription }}</h2>

But it only successfully pulls the front matter from the english site, but not the spanish site.

Please advise, thanks!

This should just work, which means there is something odd in your project setup that we cannot see. Do you have a link to the full source of this site?

Unfortunately I can’t link to it since this is my company’s site. Any idea what I should check?

Shouldn’t both files be named _index.md and _index.es.md ?

1 Like

Looks like this did it, thank you!

1 Like