Set up travis rubygems deploy & add PDFs to pages collection
This commit is contained in:
parent
e239c2d259
commit
1e24af2285
10
.travis.yml
10
.travis.yml
@ -26,8 +26,8 @@ notifications:
|
||||
|
||||
#
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
#
|
||||
deploy:
|
||||
provider: rubygems
|
||||
api_key: $RUBYGEMS_KEY
|
||||
on:
|
||||
tags: true
|
||||
@ -1,17 +1,17 @@
|
||||
Gem::Specification.new do |spec|
|
||||
spec.version = "0.1.6a"
|
||||
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 = %W(Gemfile README.md LICENSE) + Dir["lib/**/*"]
|
||||
spec.summary = "PDF generator for Jekyll"
|
||||
spec.name = "jekyll-pdf"
|
||||
spec.license = "GPL-3.0"
|
||||
|
||||
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"
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user