diff --git a/lib/template.html b/lib/template.html index e320aba..0d0aeb8 100755 --- a/lib/template.html +++ b/lib/template.html @@ -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 %} diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index 07ee0ea..1937ab9 100755 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -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!