Merge pull request #50 from benbalter/expose-version

Expose version in HTML comment
This commit is contained in:
Ben Balter 2016-02-20 14:27:52 -05:00
commit 9ceadf7f7f
3 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -1,4 +1,4 @@
<!-- Begin Jekyll SEO tag -->
<!-- Begin Jekyll SEO tag v{{ seo_tag.version }} -->
{% if site.url %}
{% assign seo_url = site.url | append: site.baseurl %}

View File

@ -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