expose version in HTML comment

This commit is contained in:
Ben Balter 2016-02-20 14:26:06 -05:00
parent 2ee2f3e6e0
commit bdedd23bf2
3 changed files with 7 additions and 1 deletions

View File

@ -17,6 +17,7 @@ module Jekyll
def payload
{
'seo_tag' => { 'version' => VERSION },
'page' => context.registers[:page],
'site' => context.registers[:site].site_payload['site']
}

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