diff --git a/lib/jekyll-seo-tag.rb b/lib/jekyll-seo-tag.rb index 376772f..c2e443f 100644 --- a/lib/jekyll-seo-tag.rb +++ b/lib/jekyll-seo-tag.rb @@ -17,8 +17,9 @@ module Jekyll def payload { - 'page' => context.registers[:page], - 'site' => context.registers[:site].site_payload['site'] + 'seo_tag' => { 'version' => VERSION }, + 'page' => context.registers[:page], + 'site' => context.registers[:site].site_payload['site'] } end 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