Skip to content

Commit 1e24af2

Browse files
committed
Set up travis rubygems deploy & add PDFs to pages collection
1 parent e239c2d commit 1e24af2

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: ruby
22
cache: bundler
33
sudo: false
4-
4+
55
#
66

77
rvm:
@@ -26,8 +26,8 @@ notifications:
2626

2727
#
2828

29-
branches:
30-
only:
31-
- master
32-
33-
#
29+
deploy:
30+
provider: rubygems
31+
api_key: $RUBYGEMS_KEY
32+
on:
33+
tags: true

jekyll-pdf.gemspec

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
Gem::Specification.new do |spec|
2-
spec.version = "0.1.6a"
3-
spec.homepage = "http://github.com/abemedia/jekyll-pdf/"
4-
spec.authors = ["Adam Bouqdib"]
5-
spec.email = ["[email protected]"]
6-
spec.files = %W(Gemfile README.md LICENSE) + Dir["lib/**/*"]
7-
spec.summary = "PDF generator for Jekyll"
8-
spec.name = "jekyll-pdf"
9-
spec.license = "GPL-3.0"
10-
spec.has_rdoc = false
2+
spec.name = "jekyll-pdf"
3+
spec.version = "0.1.6"
4+
spec.summary = "A PDF generator for Jekyll"
5+
spec.description = "A Jekyll plugin for generating PDFs from your pages, posts & documents."
6+
7+
spec.license = "GPL-3.0"
8+
spec.homepage = "http://github.com/abemedia/jekyll-pdf/"
9+
spec.authors = ["Adam Bouqdib"]
10+
spec.email = ["[email protected]"]
11+
12+
spec.files = `git ls-files`.split($/)
13+
spec.has_rdoc = false
1114
spec.require_paths = ["lib"]
12-
spec.description = spec.description = <<-DESC
13-
A Jekyll plugin, that allows you to create PDF versions of your pages & documents.
14-
DESC
1515

1616
spec.add_runtime_dependency "wkhtmltopdf-installer", "~> 0.12"
1717
spec.add_runtime_dependency "pdfkit", "~> 0.8"

lib/jekyll/pdf/document.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ def write(dest_prefix, dest_suffix = nil)
7575
File.open("#{path}.html", 'w') {|f| f.write(self.output) } if @settings["debug"]
7676
@settings.delete("debug")
7777

78-
# Trigger post-write so jekyll-assets builds assets required for the PDF
79-
Jekyll::Hooks.trigger hook_owner, :post_write, self
80-
8178
# Build PDF file
8279
fix_relative_paths
8380
kit = PDFKit.new(self.output, @settings)

lib/jekyll/pdf/generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def generate(site)
88
# Loop through pages & documents and build PDFs
99
[site.pages, site.documents].each do |items|
1010
items.each do |item|
11-
site.static_files << Document.new(site, site.source, item) if item.data['pdf']
11+
site.pages << Document.new(site, site.source, item) if item.data['pdf']
1212
end
1313
end
1414
end

0 commit comments

Comments
 (0)