diff --git a/lib/template.html b/lib/template.html
index 89a7004..85c745f 100644
--- a/lib/template.html
+++ b/lib/template.html
@@ -1,7 +1,7 @@
{% if site.url %}
- {% assign seo_url = site.url %}
+ {% assign seo_url = site.url | append: site.baseurl %}
{% elsif site.github.url %}
{% assign seo_url = site.github.url %}
{% endif %}
diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb
index ad871c7..1bc8a04 100644
--- a/spec/jekyll_seo_tag_spec.rb
+++ b/spec/jekyll_seo_tag_spec.rb
@@ -86,6 +86,15 @@ describe Jekyll::SeoTag do
expect(subject.render(context)).to match(expected)
end
+ it "uses baseurl to build the seo url" do
+ site = site({ "url" => "http://example.invalid", "baseurl" => "/foo" })
+ context = context({ :site => site })
+ expected = %r!!
+ expect(subject.render(context)).to match(expected)
+ expected = %r!!
+ expect(subject.render(context)).to match(expected)
+ end
+
it "outputs the site title meta" do
site = site({"title" => "Foo", "url" => "http://example.invalid"})
context = context({ :site => site })