-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Description
I've been using https://github.com/untra/polyglot as it seems to be the last maintained i18n implementation.
Since I'm rather new to Jekyll, it seems that you cannot utilize dynamic variables in front matter since it's utilized for static content.
I did find this random comment that was related 😆 #494 (comment)
My Example
I've been defining i18n content in /_data/en/pages/some_page.yml
I'm then able to pull the content in a template like so and have it pull the current language from the data definitions.
---
title: Some Page
---
{% assign t = site.data.pages.some_page %}
<div>
<h1>{{ t.header}}</h1>
<p>{{ t.sub_title }}</p>
</div>Proposal
I'm not sure if something like this would be possible since you cannot put dynamic content into the front matter, but it could surely help the situation if we could do something like this instead:
{% assign t = site.data.pages.some_page %}
{% assign title = t.title %}
<div>
<h1>{{ t.header}}</h1>
<p>{{ t.sub_title }}</p>
</div>I'm really hoping something like this would be possible 🤞
Metadata
Metadata
Assignees
Labels
No labels