diff --git a/.travis.yml b/.travis.yml index 38304c9..96a0b83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: ruby cache: bundler sudo: false - + # rvm: @@ -26,8 +26,8 @@ notifications: # -branches: - only: - - master - -# +deploy: + provider: rubygems + api_key: $RUBYGEMS_KEY + on: + tags: true \ No newline at end of file diff --git a/jekyll-pdf.gemspec b/jekyll-pdf.gemspec index 6919bbb..fb31454 100644 --- a/jekyll-pdf.gemspec +++ b/jekyll-pdf.gemspec @@ -1,17 +1,17 @@ Gem::Specification.new do |spec| - spec.version = "0.1.6a" - spec.homepage = "http://github.com/abemedia/jekyll-pdf/" - spec.authors = ["Adam Bouqdib"] - spec.email = ["adam@abemedia.co.uk"] - spec.files = %W(Gemfile README.md LICENSE) + Dir["lib/**/*"] - spec.summary = "PDF generator for Jekyll" - spec.name = "jekyll-pdf" - spec.license = "GPL-3.0" - spec.has_rdoc = false + spec.name = "jekyll-pdf" + spec.version = "0.1.6" + spec.summary = "A PDF generator for Jekyll" + spec.description = "A Jekyll plugin for generating PDFs from your pages, posts & documents." + + spec.license = "GPL-3.0" + spec.homepage = "http://github.com/abemedia/jekyll-pdf/" + spec.authors = ["Adam Bouqdib"] + spec.email = ["adam@abemedia.co.uk"] + + spec.files = `git ls-files`.split($/) + spec.has_rdoc = false spec.require_paths = ["lib"] - spec.description = spec.description = <<-DESC - A Jekyll plugin, that allows you to create PDF versions of your pages & documents. - DESC spec.add_runtime_dependency "wkhtmltopdf-installer", "~> 0.12" spec.add_runtime_dependency "pdfkit", "~> 0.8" diff --git a/lib/jekyll/pdf/document.rb b/lib/jekyll/pdf/document.rb index 74bd35b..0b2ae72 100644 --- a/lib/jekyll/pdf/document.rb +++ b/lib/jekyll/pdf/document.rb @@ -75,9 +75,6 @@ module Jekyll File.open("#{path}.html", 'w') {|f| f.write(self.output) } if @settings["debug"] @settings.delete("debug") - # Trigger post-write so jekyll-assets builds assets required for the PDF - Jekyll::Hooks.trigger hook_owner, :post_write, self - # Build PDF file fix_relative_paths kit = PDFKit.new(self.output, @settings) diff --git a/lib/jekyll/pdf/generator.rb b/lib/jekyll/pdf/generator.rb index dafaa25..db712c6 100644 --- a/lib/jekyll/pdf/generator.rb +++ b/lib/jekyll/pdf/generator.rb @@ -8,7 +8,7 @@ module Jekyll # Loop through pages & documents and build PDFs [site.pages, site.documents].each do |items| items.each do |item| - site.static_files << Document.new(site, site.source, item) if item.data['pdf'] + site.pages << Document.new(site, site.source, item) if item.data['pdf'] end end end