Set up travis rubygems deploy & add PDFs to pages collection
This commit is contained in:
parent
e239c2d259
commit
1e24af2285
12
.travis.yml
12
.travis.yml
@ -1,7 +1,7 @@
|
|||||||
language: ruby
|
language: ruby
|
||||||
cache: bundler
|
cache: bundler
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
rvm:
|
rvm:
|
||||||
@ -26,8 +26,8 @@ notifications:
|
|||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
branches:
|
deploy:
|
||||||
only:
|
provider: rubygems
|
||||||
- master
|
api_key: $RUBYGEMS_KEY
|
||||||
|
on:
|
||||||
#
|
tags: true
|
||||||
@ -1,17 +1,17 @@
|
|||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.version = "0.1.6a"
|
spec.name = "jekyll-pdf"
|
||||||
spec.homepage = "http://github.com/abemedia/jekyll-pdf/"
|
spec.version = "0.1.6"
|
||||||
spec.authors = ["Adam Bouqdib"]
|
spec.summary = "A PDF generator for Jekyll"
|
||||||
spec.email = ["adam@abemedia.co.uk"]
|
spec.description = "A Jekyll plugin for generating PDFs from your pages, posts & documents."
|
||||||
spec.files = %W(Gemfile README.md LICENSE) + Dir["lib/**/*"]
|
|
||||||
spec.summary = "PDF generator for Jekyll"
|
spec.license = "GPL-3.0"
|
||||||
spec.name = "jekyll-pdf"
|
spec.homepage = "http://github.com/abemedia/jekyll-pdf/"
|
||||||
spec.license = "GPL-3.0"
|
spec.authors = ["Adam Bouqdib"]
|
||||||
spec.has_rdoc = false
|
spec.email = ["adam@abemedia.co.uk"]
|
||||||
|
|
||||||
|
spec.files = `git ls-files`.split($/)
|
||||||
|
spec.has_rdoc = false
|
||||||
spec.require_paths = ["lib"]
|
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 "wkhtmltopdf-installer", "~> 0.12"
|
||||||
spec.add_runtime_dependency "pdfkit", "~> 0.8"
|
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"]
|
File.open("#{path}.html", 'w') {|f| f.write(self.output) } if @settings["debug"]
|
||||||
@settings.delete("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
|
# Build PDF file
|
||||||
fix_relative_paths
|
fix_relative_paths
|
||||||
kit = PDFKit.new(self.output, @settings)
|
kit = PDFKit.new(self.output, @settings)
|
||||||
|
|||||||
@ -8,7 +8,7 @@ module Jekyll
|
|||||||
# Loop through pages & documents and build PDFs
|
# Loop through pages & documents and build PDFs
|
||||||
[site.pages, site.documents].each do |items|
|
[site.pages, site.documents].each do |items|
|
||||||
items.each do |item|
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user