{"action":"created","issue":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/4967","repository_url":"https://api.github.com/repos/jekyll/jekyll","labels_url":"https://api.github.com/repos/jekyll/jekyll/issues/4967/labels{/name}","comments_url":"https://api.github.com/repos/jekyll/jekyll/issues/4967/comments","events_url":"https://api.github.com/repos/jekyll/jekyll/issues/4967/events","html_url":"https://github.com/jekyll/jekyll/pull/4967","id":157550520,"number":4967,"title":"Suggested a more elegant way to handle the lang attribute","user":{"login":"HugoGiraudel","id":1889710,"avatar_url":"https://avatars.githubusercontent.com/u/1889710?v=3","gravatar_id":"","url":"https://api.github.com/users/HugoGiraudel","html_url":"https://github.com/HugoGiraudel","followers_url":"https://api.github.com/users/HugoGiraudel/followers","following_url":"https://api.github.com/users/HugoGiraudel/following{/other_user}","gists_url":"https://api.github.com/users/HugoGiraudel/gists{/gist_id}","starred_url":"https://api.github.com/users/HugoGiraudel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HugoGiraudel/subscriptions","organizations_url":"https://api.github.com/users/HugoGiraudel/orgs","repos_url":"https://api.github.com/users/HugoGiraudel/repos","events_url":"https://api.github.com/users/HugoGiraudel/events{/privacy}","received_events_url":"https://api.github.com/users/HugoGiraudel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-30T19:58:26Z","updated_at":"2016-05-30T20:25:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jekyll/jekyll/pulls/4967","html_url":"https://github.com/jekyll/jekyll/pull/4967","diff_url":"https://github.com/jekyll/jekyll/pull/4967.diff","patch_url":"https://github.com/jekyll/jekyll/pull/4967.patch"},"body":"A few months ago I added the `lang` attribute to the `<html>` element of the default site because it causes an accessibility issue not to have it: https://github.com/jekyll/jekyll/pull/4633. I think setting it to `en` is a bit of a quick assumption though.\r\n\r\nI suggest we set it to `page.lang` if it is set, or `en` as a default value. This change will play well with the regular pattern of setting a `lang` option in the YAML front matter of a page to specify its language, and the `en` default value seems reasonable enough since it is, well, a default. :)\r\n\r\n[Someone suggested we use `site.lang`](https://github.com/jekyll/jekyll/pull/4633#issuecomment-194942403) and add it in `_config.yml`. I first thought it would be a good idea, but I now disagree on this point since it would not make sense anymore in a multi-lingual Jekyll website. I think relying on `page` is simply safer."},"comment":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/comments/222550465","html_url":"https://github.com/jekyll/jekyll/pull/4967#issuecomment-222550465","issue_url":"https://api.github.com/repos/jekyll/jekyll/issues/4967","id":222550465,"user":{"login":"ayastreb","id":2777667,"avatar_url":"https://avatars.githubusercontent.com/u/2777667?v=3","gravatar_id":"","url":"https://api.github.com/users/ayastreb","html_url":"https://github.com/ayastreb","followers_url":"https://api.github.com/users/ayastreb/followers","following_url":"https://api.github.com/users/ayastreb/following{/other_user}","gists_url":"https://api.github.com/users/ayastreb/gists{/gist_id}","starred_url":"https://api.github.com/users/ayastreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayastreb/subscriptions","organizations_url":"https://api.github.com/users/ayastreb/orgs","repos_url":"https://api.github.com/users/ayastreb/repos","events_url":"https://api.github.com/users/ayastreb/events{/privacy}","received_events_url":"https://api.github.com/users/ayastreb/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T20:25:32Z","updated_at":"2016-05-30T20:25:32Z","body":"+1 to rely on `page` - on a multi-lingual site there could be pages with different languages on the same site. Depends of course how this \"multi-lingual\" is implemented on concrete website 😄 \r\nMaybe it could fallback to `site` if there is no `page.lang`?"}}
{"actor":{"display_login":"ayastreb"}}