Different language on same posts
antwal opened this issue · 0 comments
antwal commented
Hi,
I have a very similar problem of issue #115 that I just can't solve
Using a structure like the one proposed by @joshcummingsdesign it works perfectly the only problem is that if I want to show users if a certain post is present in another language I can't do it.
example posts:
---
layout: post
title: "Bootstrap is The Most Popular Framework"
date: 2020-09-20 14:50:25 +0200
categories: bootstrap update
reference: A34G5D
lang: en
---
---
layout: post
title: "Bootstrap es el marco más popular"
date: 2020-09-20 14:50:25 +0200
categories: bootstrap update
reference: A34G5D
lang: es
---
using the following code, specifying the same "reference" for multiple posts in multiple languages doesn't work, as site.posts only returns posts of the current language:
{% assign posts = site.posts | where: "reference", page.reference %}
Is there any way to fix this?
Thanks.