Skip to content

Commit

Permalink
Set up travis rubygems deploy & add PDFs to pages collection
Browse files Browse the repository at this point in the history
  • Loading branch information
abemedia committed Sep 20, 2016
1 parent e239c2d commit 1e24af2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: ruby
cache: bundler
sudo: false

#

rvm:
Expand All @@ -26,8 +26,8 @@ notifications:

#

branches:
only:
- master

#
deploy:
provider: rubygems
api_key: $RUBYGEMS_KEY
on:
tags: true
24 changes: 12 additions & 12 deletions jekyll-pdf.gemspec
Original file line number Diff line number Diff line change
@@ -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 = ["[email protected]"]
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 = ["[email protected]"]

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"
Expand Down
3 changes: 0 additions & 3 deletions lib/jekyll/pdf/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ def write(dest_prefix, dest_suffix = nil)
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)
Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll/pdf/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def generate(site)
# 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
Expand Down

0 comments on commit 1e24af2

Please sign in to comment.