Correct template logic, resolve style issues
This commit is contained in:
parent
4eeb09a749
commit
51db5806c2
|
@ -10,7 +10,7 @@
|
|||
|
||||
{% if page.title and seo_site_title %}
|
||||
{% assign seo_title = seo_title | append:" | " | append: seo_site_title %}
|
||||
{% elsif site.description %}
|
||||
{% elsif site.description and seo_site_title %}
|
||||
{% assign seo_title = seo_title | append:" | " | append: site.description %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -60,6 +60,14 @@ describe Jekyll::SeoTag do
|
|||
end
|
||||
end
|
||||
|
||||
context "with site.description" do
|
||||
let(:site) { make_site("description" => "Site Description") }
|
||||
|
||||
it "builds the title without the site description" do
|
||||
expect(output).not_to match(%r!<title>foo \| Site Description</title>!)
|
||||
end
|
||||
end
|
||||
|
||||
context "with site.title and site.description" do
|
||||
let(:site) { make_site("title" => "Site Title", "description" => "Site Description") }
|
||||
|
||||
|
@ -82,9 +90,7 @@ describe Jekyll::SeoTag do
|
|||
it "does not build the title with the site description" do
|
||||
expect(output).not_to match(%r!<title>Page Title \| Site Description</title>!)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context "with site.title" do
|
||||
|
|
Loading…
Reference in New Issue