Switching to site.lang & page.lang to align with jekyll-feed

This commit is contained in:
Aaron Gustafson 2017-04-03 11:21:48 -04:00
parent 8a5b022a89
commit abf32914b7
2 changed files with 7 additions and 7 deletions

View File

@ -97,7 +97,7 @@
{% assign seo_page_image = seo_page_image | escape %}
{% endif %}
{% assign seo_page_locale = page.locale | default: site.locale | default: "en_US"" %}
{% assign seo_page_locale = page.lang | default: site.lang | default: "en_US"" %}
{% if seo_tag.title and seo_title %}
<title>{{ seo_title }}</title>

View File

@ -589,18 +589,18 @@ EOS
expect(output).to match(expected)
end
context "with site.locale" do
let(:site) { make_site("locale" => "en_US") }
context "with site.lang" do
let(:site) { make_site("lang" => "en_US") }
it "uses site.locale if page.locale is not present" do
it "uses site.lang if page.lang is not present" do
expected = %r!<meta property="og:locale" content="en_US" />!
expect(output).to match(expected)
end
context "with page.locale" do
let(:page) { make_page("locale" => "en_UK") }
context "with page.lang" do
let(:page) { make_page("lang" => "en_UK") }
it "uses page.locale if both site.locale and page.locale are present" do
it "uses page.lang if both site.lang and page.lang are present" do
expected = %r!<meta property="og:locale" content="en_UK" />!
expect(output).to match(expected)
end