-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to access the page front matter in a specific language? #201
Comments
Maybe polyglot could export some attributes at the Page in page_id: aaa
title: a title
description: a description
localizations:
pt-br:
title: um título
description: uma descrição what do you think? If you give me some pointers I could implement something that would help. |
I would think the move is to put the data you need on the page in the localization you are working with?
Wouldn't someone have multiple pages in different langs with their own frontmatter? I don't see why the page would have mixed frontmatter values? Page in
page in
otherwise I think these are values that should live in |
The problem is that the title is coming wrong in my case. For example, check this page. The related blog posts down below have both the titles and urls in The code that I use to create this section is here. I simply do a loop {% for post in site.related_posts | limit: site.related_blog_posts.max_related %} where these <a class="text-pink-700 underline font-semibold hover:text-pink-800" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a> |
I am not sure that the LSI is being calculated based on all posts (including other languages) or only in the specified language. But either way, the urls are pointing to the correct localized page while the titles are returning the non-localized ones. |
I've been struggling with this for a while now: related blog posts are not calculated with Latent Semantic Indexer (LSI) for localized blog posts. I've asked for help on Jekyll talk, opened an issue in the classifier-reborn plugin, and left an open issue on my template repo as a reminder of this.
Just now I realized that after I moved from Jekyll Multiple Languages Plugin to
Polyglot
the related blog posts are at least created with the correct localized link to the post, but not the localized page title. So is there a way to get a localized version of the page given I have access to the original version of it? This way I could get the properpage.title
attribute and use the localized page title for the posts. This issue can be seen in any localized blog post in my template demo, at the end of it.I believe now that having access to the front matter also solves #199.
The text was updated successfully, but these errors were encountered: