diff --git a/lib/jekyll-seo-tag.rb b/lib/jekyll-seo-tag.rb index 376772f..dd71ea7 100644 --- a/lib/jekyll-seo-tag.rb +++ b/lib/jekyll-seo-tag.rb @@ -17,6 +17,7 @@ module Jekyll def payload { + 'seo_tag' => { 'version' => VERSION }, 'page' => context.registers[:page], 'site' => context.registers[:site].site_payload['site'] } diff --git a/lib/template.html b/lib/template.html index 9a77b4c..4c45ad0 100644 --- a/lib/template.html +++ b/lib/template.html @@ -1,4 +1,4 @@ - + {% if site.url %} {% assign seo_url = site.url | append: site.baseurl %} diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index 4408cba..86c8124 100644 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -193,4 +193,9 @@ describe Jekyll::SeoTag do status = HTML::Proofer.new(dest_dir, options).run expect(status).to eql(true) end + + it 'outputs the plugin version' do + version = Jekyll::SeoTag::VERSION + expect(subject.render(context)).to match(/Jekyll SEO tag v#{version}/i) + end end