Skip to content
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

lang != locale #375

Closed
fiskhandlarn opened this issue Jan 16, 2020 · 4 comments · Fixed by #388
Closed

lang != locale #375

fiskhandlarn opened this issue Jan 16, 2020 · 4 comments · Fixed by #388

Comments

@fiskhandlarn
Copy link

From https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md:

  • lang - The locale these tags are marked up in. Of the format language_TERRITORY. Default is en_US.

Whatever lang is set to seems to be used both for the lang attribute in the html tag as well as for the og:locale property.
HTML's lang should adhere to ISO 639-1 (that is, language only) but og:locale should be on the language_TERRITORY format.

Suggestion: Add locale config setting and use that for og:locale. Use lang setting only for HTML's lang.

@jekyllbot

This comment has been minimized.

@Sti2nd
Copy link

Sti2nd commented May 1, 2020

I can reproduce this in version 2.6.1.

Steps to reproduce:

  1. In the front matter of a page/post add language like this: lang: en_GB
  2. Generate site
  3. Find the generated html and look at the html tag. For me it looks like this:
<html lang="en_GB">

This is a bug because, as the original comment says, the lang attribute on the html tag takes another language code and should look like this:

<html lang="en">

Other information:

When one don't specify the lang variable en_US is the default, but interestingly enough it correctly sets the lang attribute to be "en".

I am using this plugin through Github Pages.

@jekyllbot jekyllbot removed the stale label May 1, 2020
@ashmaroli
Copy link
Member

The common issue in both of the comments above is that <html lang="en_GB"> is incorrect.
While that is true, it doesn't concern this plugin because this plugin doesn't render the <html /> tag, only stuff in the <head /> tag.

While we shall look into resolving the issue with the og:locale property, @Sti2nd You may need to open a ticket with the Minima theme repository regarding the <html/> tag because it comes from your theme.

@Sti2nd
Copy link

Sti2nd commented May 2, 2020

Thank you @ashmaroli , created an issue in the Minima repo.

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

Successfully merging a pull request may close this issue.

4 participants