jekyll_asciidoctor_pdf 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3e6590ee0e5ead614d248f9dcc4934e9afed03ab8e16a644e4fd4487269e460
4
- data.tar.gz: 0ae581131139d1a678ad98ba95effb0b215c2e929dbbdcfb7b31585a3364c938
3
+ metadata.gz: 88586c97b2eadf108ff201a33b5c1a56123e13011134f3abf86aa8733f71e72d
4
+ data.tar.gz: 14aff1159ef1f74bf8f64be4fcfa5324ff521d856f2a64233636150f48a2fd67
5
5
  SHA512:
6
- metadata.gz: 26450259545d5dc540f234a3fa54311548e066951314c5c9b887d01e0049bdadd83e768290bc5fc0e832e164d84cbc603b3ca980f9f0cf17bafa225315ba77cd
7
- data.tar.gz: 0a6c7c88a55e0ea38789f71e562874f697355c07068f62297e4af6e4f15e0244c93c29a6764e7c7eb3d87d3ac9ae18d72eb7d8e1a8ec445af9eafdfa2dbce7bf
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)
@@ -1,3 +1,3 @@
1
1
  module JekyllAsciidoctorPdf
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
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.1
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-08 00:00:00.000000000 Z
11
+ date: 2020-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler