Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Different language on same posts #176

Open
antwal opened this issue Sep 24, 2020 · 0 comments
Open

Different language on same posts #176

antwal opened this issue Sep 24, 2020 · 0 comments

Comments

@antwal
Copy link

antwal commented Sep 24, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant