getgrav / grav-plugin-sitemap

Grav Sitemap Plugin
https://getgrav.org
MIT License
42 stars 42 forks source link

Missing translations in JSON sitemap #100

Open bitstarr opened 2 years ago

bitstarr commented 2 years ago

I am using translation strings for some page titles in my project. In the sitemap.json these titles will not be translated. Can we have a config flag to enable translation?

example json

Karmalakas commented 2 years ago

What's the use case here? Shouldn't title come from page frontmatter header, which should be different for different languages? That's kind of a user input field rather than some code coming from a script 🤔

bitstarr commented 2 years ago

I don't use the admin plugin in this scenario. Generic pages like contact or search result pages use translation strings in frontmatter and will be translated template wise.

Using those strings is useful especially with a contact form. You don't need multiple markdown files for one page, which reduced the need to change multiple places in case you modify the form.

Yes, it's pretty non standard but kind of convenient.