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 +4 -4
- data/.travis.yml +1 -0
- data/README.adoc +89 -1
- data/jekyll_asciidoctor_pdf.gemspec +1 -1
- data/lib/jekyll_asciidoctor_pdf/commands.rb +8 -2
- data/lib/jekyll_asciidoctor_pdf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81a66a88d2063060425ff0bd92f8a872ab0cd43c3adc91c83a3f9dfb30a01629
|
4
|
+
data.tar.gz: a0d82d2cb06efa99c9b3478b7f733dcea2740637c9ca83dd67ac6cdbb85d9cd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a86d39357db19907c82a2268e8bc5dd287fafe1581e7037864964f5a0407ee48d2d442ae75586827ed39d2e973ca4de74baf2fddd55254386ea9f50320931206
|
7
|
+
data.tar.gz: 5aafdca752f5edb29c1495b50332a3b52480d55bb2cba9645aacf41ab6d098ae190fd15b6773824f0ef2b58f37d12236b951570798655cb324df523d2dec3cc7
|
data/.travis.yml
CHANGED
data/README.adoc
CHANGED
@@ -1,10 +1,98 @@
|
|
1
1
|
= Jekyll PDF Generator using AsciiDoctor
|
2
|
-
:gem-name:
|
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://
|
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
|
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::[]
|
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.
|
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://
|
130
|
+
homepage: https://rubygems.org/gems/jekyll_asciidoctor_pdf
|
131
131
|
licenses:
|
132
132
|
- MIT
|
133
133
|
metadata: {}
|