jekyll_asciidoctor_pdf 0.3.1 → 0.3.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88586c97b2eadf108ff201a33b5c1a56123e13011134f3abf86aa8733f71e72d
|
4
|
+
data.tar.gz: 14aff1159ef1f74bf8f64be4fcfa5324ff521d856f2a64233636150f48a2fd67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b46c60ae81a4122c1198025424122a73c917bd5de39bb93a3555c83db5c003a5a70ab3681e262000f735e8a9eb5c26a3d00be70b5040b3423bbc7eed7e48ea85
|
7
|
+
data.tar.gz: b33d0ee11c17f0d9cde69a42fbb3fbc10e68584bb408aeeaa2615d9bd71292b10403575976d0f60060db978921b125114bac8b66fe1a364a84966f98ab719fd6
|
@@ -25,7 +25,7 @@ module JekyllAsciidoctorPdf
|
|
25
25
|
# - Execute the convert process
|
26
26
|
# - Let the caller to collect information from the front_matter and from the file itself
|
27
27
|
#
|
28
|
-
def self.generatePdf(product_name, file, output_path, parameters, cover_page, theme_pdf, revision, authors)
|
28
|
+
def self.generatePdf(product_name, file, output_path, parameters, cover_page, theme_pdf, revision, authors, base_url)
|
29
29
|
|
30
30
|
front_matter = {}
|
31
31
|
|
@@ -35,7 +35,7 @@ module JekyllAsciidoctorPdf
|
|
35
35
|
front_matter = SafeYAML.load(Regexp.last_match(1))
|
36
36
|
end
|
37
37
|
|
38
|
-
stream_adoc = content.gsub(YAML_FRONT_MATTER_REGEXP, '')
|
38
|
+
stream_adoc = content.gsub(YAML_FRONT_MATTER_REGEXP, '').gsub(/(^|\s)link:(?!(http:|https:))/,'\1link:' + base_url)
|
39
39
|
|
40
40
|
# We should think about the performance of get the title in that way
|
41
41
|
adoc = Asciidoctor.load stream_adoc
|
@@ -67,16 +67,15 @@ module JekyllAsciidoctorPdf
|
|
67
67
|
attr_reader :absolute_cover_page
|
68
68
|
attr_reader :absolute_theme_pdf
|
69
69
|
attr_reader :git_info
|
70
|
+
attr_reader :base_url
|
70
71
|
|
71
72
|
attr_reader :quiet
|
72
73
|
|
73
74
|
callable_attr :jekyll_config_file, '_config.yml'
|
74
|
-
|
75
75
|
callable_attr :product_name, 'NetApp'
|
76
76
|
callable_attr :repo_name, ''
|
77
77
|
callable_attr :git_token, ''
|
78
78
|
|
79
|
-
|
80
79
|
##
|
81
80
|
#
|
82
81
|
def initialize(name = :build_pdf)
|
@@ -92,6 +91,7 @@ module JekyllAsciidoctorPdf
|
|
92
91
|
yield self if block_given?
|
93
92
|
|
94
93
|
@git_info = GitInfo.new(git_token, 'NetAppDocs/' + repo_name)
|
94
|
+
@base_url = 'https://docs.netapp.com/us-en/'+ repo_name + '/'
|
95
95
|
@absolute_config_file = File.join(@absolute_working_path, jekyll_config_file);
|
96
96
|
|
97
97
|
do_jekyll_config_ok? do |t|
|
@@ -250,7 +250,7 @@ module JekyllAsciidoctorPdf
|
|
250
250
|
|
251
251
|
authors = git_info.getAuthorsList(file)
|
252
252
|
|
253
|
-
JekyllAsciidoctorPdf::ADoc.generatePdf(product_name, file, output_path, parameters, absolute_cover_page, absolute_theme_pdf, last_modified_at, authors ) do |front_matter, stream_adoc|
|
253
|
+
JekyllAsciidoctorPdf::ADoc.generatePdf(product_name, file, output_path, parameters, absolute_cover_page, absolute_theme_pdf, last_modified_at, authors, base_url ) do |front_matter, stream_adoc|
|
254
254
|
if front_matter.key?('permalink')
|
255
255
|
name = File.join('/', front_matter['permalink'])
|
256
256
|
data = PermalinkData.new(front_matter['sidebar'], stream_adoc, file, last_modified_at)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_asciidoctor_pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guido Genzone
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|