jekyll_asciidoctor_pdf 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4b11ffb4ac2be03a16972ded5242a70584fa5cd01c7d2b89be82dd723fa1805
4
- data.tar.gz: b2f9ab8fb396f227940e2f3bae283f2ef7c5ffd3d88f389a32877594cadf67aa
3
+ metadata.gz: 81a66a88d2063060425ff0bd92f8a872ab0cd43c3adc91c83a3f9dfb30a01629
4
+ data.tar.gz: a0d82d2cb06efa99c9b3478b7f733dcea2740637c9ca83dd67ac6cdbb85d9cd1
5
5
  SHA512:
6
- metadata.gz: 66de845ade0747136063df8d6021187ec0324df2749730b3f7c2afa9fdf2e6a36bb71f3a748766543b4ad9eceebb964b2a7ed3fa5a5813f5716521471716ba70
7
- data.tar.gz: e273e68ad8847f1d4ac3f4b8264111595a41b65d2def3fdb7d5b0d3f46207ee0192ba58697cf698f76a4d129bee719bb6691690a3dce52a8525603ed5cff5a95
6
+ metadata.gz: a86d39357db19907c82a2268e8bc5dd287fafe1581e7037864964f5a0407ee48d2d442ae75586827ed39d2e973ca4de74baf2fddd55254386ea9f50320931206
7
+ data.tar.gz: 5aafdca752f5edb29c1495b50332a3b52480d55bb2cba9645aacf41ab6d098ae190fd15b6773824f0ef2b58f37d12236b951570798655cb324df523d2dec3cc7
@@ -9,3 +9,4 @@ before_install:
9
9
  script:
10
10
  - bundle exec rake test
11
11
  - bundle exec rake build
12
+ - bundle exec rake install
@@ -1,10 +1,98 @@
1
1
  = Jekyll PDF Generator using AsciiDoctor
2
- :gem-name: rake_jekyll_asciidoctor_pdf
2
+ :gem-name: jekyll_asciidoctor_pdf
3
3
  :gh-branch: master
4
4
  :badge-style: flat
5
+ :release-version: 0.0.14
5
6
 
6
7
  image:https://img.shields.io/gem/v/{gem-name}.svg?style={badge-style}[Gem Version, link="https://rubygems.org/gems/{gem-name}"]
8
+ image:https://travis-ci.com/NetAppDocs/jekyll-asciidoctor-pdf.svg?token=jmKxRqiJdAgY6ceg7i2d&branch=master["Build Status", link="https://travis-ci.com/NetAppDocs/jekyll-asciidoctor-pdf"]
7
9
 
8
10
  toc::[]
9
11
 
12
+ This gem allows you to generate PDFs from your Asciidoctor files.
13
+
14
+ To simplify installation, JekyllAsciidoctorPDF is packaged and distributed as a RubyGem (aka gem) to https://rubygems.org/gems/{gem-name}[RubyGems.org].
15
+
16
+ == Bundler
17
+
18
+ . Open your Gemfile in the root folder of your Jekyll project
19
+ . Add the `{gem-name}` gem to your Gemfile as follows:
20
+ +
21
+ [source,subs=attributes+]
22
+ ----
23
+ source 'https://rubygems.org'
24
+ gem '{gem-name}'
25
+
26
+ # or specify the version explicitly
27
+ # gem '{gem-name}', '{release-version}'
28
+ ----
29
+
30
+ . Save the Gemfile
31
+ . Open a terminal and install the gem using:
32
+
33
+ $ bundle
34
+
35
+
36
+ == Rakefile
37
+
38
+ . Open your Rakefile in the root folder of your Jekyll project
39
+ . Add following lines
40
+ [source,Rakefile]
41
+ ----
42
+ require 'rake_jekyll_asciidoctor_pdf'
43
+
44
+ RakeJekyllAsciidoctorPdf::BuildTask.new('buildAll') do |t|
45
+ t.jekyll_config_file = '_config.yml'
46
+ end
47
+ ----
48
+
49
+ . Save the Rakefile
50
+
51
+ == Jekyll Configuration
52
+
53
+ . Open your _config.yml in the root folder of your Jekyll project
54
+ . Add following lines
55
+ [source,ruby]
56
+ ----
57
+ jap_config:
58
+ sidebar_file: '_data/sidebar.yml'
59
+ output_path: 'pdfs'
60
+ source_path: '.'
61
+ assets_list: ['media']
62
+ exclude_list: []
63
+ fullsite:
64
+ title: "Main Title"
65
+ subtitle: "Subtitle"
66
+ authors: "Author1, Author2"
67
+ revision: "Revision Date"
68
+ background_image: 'cover_page_background.jpg'
69
+ pdf_theme:
70
+ extends: default
71
+ ----
72
+
73
+ NOTE: This configuration assume an specific directory structure
74
+
75
+ == Directory Structure
76
+
77
+ A basic directory structure usually looks something like this:
78
+
79
+ ```
80
+ .
81
+ ├── _config.yml
82
+ ├── _data
83
+ │ └── sidebar.yml
84
+ ├── media
85
+ │ └── assets files
86
+ ├── pdfs # this folder will be created by rake_jekyll_asciidoctor_pdf
87
+ │ ├── pages/
88
+ │ └── fullsite/
89
+ └── *.adoc # all asciidoc files are in the root level
90
+ ```
91
+
92
+
93
+ == Usage
94
+
95
+ $ bundle exec rake buildAll
96
+
97
+
10
98
 
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
 
13
13
  spec.summary = 'Rake tasks to convert *.adoc files from Jekyll to PDF using asciidoctor-pdf'
14
14
  spec.description = 'Rake tasks to convert *.adoc files from Jekyll to PDF using asciidoctor-pdf'
15
- spec.homepage = 'https://github.com/ggenzone/jekyll_asciidoctor_pdf'
15
+ spec.homepage = 'https://rubygems.org/gems/jekyll_asciidoctor_pdf'
16
16
  spec.license = 'MIT'
17
17
 
18
18
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
@@ -275,6 +275,12 @@ module JekyllAsciidoctorPdf
275
275
  cp_r(file, absolute_temp_path, quiet)
276
276
  end
277
277
 
278
+ fullsite_config = parameters['fullsite']
279
+ background_image = File.join(absolute_working_path, fullsite_config['background_image'])
280
+ output_background_image = File.join(absolute_temp_path, '/media', 'cover_page_background.jpg')
281
+ cp_r(background_image, output_background_image, quiet)
282
+
283
+
278
284
  output = File.join(absolute_output_path,'fullsite_template.pdf')
279
285
  #cp(File.join('fullsite_template.adoc'),build_fullsite_output , quiet)
280
286
  cd(absolute_temp_path)
@@ -308,7 +314,7 @@ module JekyllAsciidoctorPdf
308
314
  subtitle = fullsite_config['subtitle']
309
315
  authors = fullsite_config['authors']
310
316
  revision = fullsite_config['revision']
311
- background_image = fullsite_config['background_image']
317
+ #background_image = fullsite_config['background_image']
312
318
 
313
319
  text = <<~TEXT
314
320
  = #{title} : #{subtitle}
@@ -329,7 +335,7 @@ module JekyllAsciidoctorPdf
329
335
  ifdef::backend-pdf[]
330
336
  :pdf-theme: pdf-theme.yml
331
337
  :title-page:
332
- :title-page-background-image: image:#{background_image}[fit=none,pdfwidth=100%,position=top]
338
+ :title-page-background-image: image:cover_page_background.jpg[fit=none,pdfwidth=100%,position=top]
333
339
  :source-highlighter: rouge
334
340
  //:rouge-style: github
335
341
  endif::[]
@@ -1,3 +1,3 @@
1
1
  module JekyllAsciidoctorPdf
2
- VERSION = '0.0.14'
2
+ VERSION = '0.0.15'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_asciidoctor_pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guido Genzone
@@ -127,7 +127,7 @@ files:
127
127
  - lib/jekyll_asciidoctor_pdf/commands.rb
128
128
  - lib/jekyll_asciidoctor_pdf/tree.rb
129
129
  - lib/jekyll_asciidoctor_pdf/version.rb
130
- homepage: https://github.com/ggenzone/jekyll_asciidoctor_pdf
130
+ homepage: https://rubygems.org/gems/jekyll_asciidoctor_pdf
131
131
  licenses:
132
132
  - MIT
133
133
  metadata: {}