jekyll-rdf 3.0.0.pre.develop.402 → 3.0.0.pre.develop.411

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: bfa596e726fdcc001da9fe18a52cfaad90d006f77f5c24899d985a0107eb1833
4
- data.tar.gz: 47aad3ab3fee69b78988214051ee331be915fff051a961a893678f45627d21e7
3
+ metadata.gz: 02974fe5e76067be8c148e41f3a6e928bff9db0b34a53b07af5ea0287ba0811e
4
+ data.tar.gz: 08da424a063e05237e71a17e3a3e1c21c02b537dcbdd53feac0f18f81bfef9e7
5
5
  SHA512:
6
- metadata.gz: f4f6b3cfcb6942426db3780b9e3f38cd32a3ef361f4d1316ce5d5dfc2795515f665a862c427aeca324b4b546d14b56f363dad34aff4a59e240ef20584a3607ab
7
- data.tar.gz: 919d6dab6c17ed897feec35608e8c73f1f12edbd51f0fb21da037d11df6262409795d282716fe229da32e54734f7478f010d2aacc62aeaa854176a9f9f199441
6
+ metadata.gz: f21af48d4506abcf25680822325b404329ffc04bf08b6520edfa3ef233daf0c58b40990e644d6bd0a8b8aa718b230c6274984f72e1cffe2981eaf0858ea022fe
7
+ data.tar.gz: 122d05330026a94b4a2b1e99be417ca558ce41c64451706f755569378a264a5e48d98633e303aba8d8ee6dea0c8a7c3ee215e273079669fc19b96427e702f05c
@@ -10,10 +10,11 @@ module Jekyll
10
10
  # * +resource+ - the resource that will be mapped to a template
11
11
  # * +mapper+ - the mapper that provides the resource mappings
12
12
  def map_template(resource, mapper)
13
- @template = mapper.map(resource)
13
+ @template = mapper.map(resource).gsub(".html", "") unless mapper.map(resource).nil? #gsub only for downward compatibility // remove gsub + unless on next version update
14
14
  if(@template.nil?)
15
15
  Jekyll.logger.warn("Resource #{resource} not rendered: No fitting template or default template found.")
16
16
  @complete = false
17
+ return
17
18
  end
18
19
  end
19
20
 
@@ -21,9 +22,16 @@ module Jekyll
21
22
  # loads the data from the yaml-frontmatter and extends page.data with three key value pairs:
22
23
  # -title -> contains the resource.iri
23
24
  # -rdf -> contains the resource itself
24
- # -template -> contains the path to the currenly used template
25
+ # -template -> contains the path to the currently used template
25
26
  def load_data(site)
26
- self.read_yaml(File.join(@base, '_layouts'), @template)
27
+ if(@site.layouts[@template].nil?)
28
+ Jekyll.logger.error "Template #{@template} was not loaded by Jekyll for #{self.name}.\n Skipping Page."
29
+ self.data = {}
30
+ @complete = false
31
+ return
32
+ end
33
+ @path = @site.layouts[@template].path
34
+ self.read_yaml(@site.layouts[@template].instance_variable_get(:@base_dir), @site.layouts[@template].name)
27
35
  self.data['title'] = @resource.iri
28
36
  self.data['rdf'] = @resource
29
37
  self.data['template'] = @template
@@ -40,7 +48,7 @@ module Jekyll
40
48
  # loads the prefix data passed in the layout yaml-frontmatter into page.data["rdf_prefixes"] and page.data["rdf_prefix_map"]
41
49
  def load_prefixes_yaml
42
50
  if !self.data["rdf_prefix_path"].nil?
43
- load_prefixes(File.join(@base, self.data["rdf_prefix_path"].strip), self.data)
51
+ load_prefixes(File.join(@site.layouts[@template].instance_variable_get(:@base_dir), self.data["rdf_prefix_path"].strip), self.data)
44
52
  end
45
53
  end
46
54
  end
@@ -53,12 +53,11 @@ module Jekyll
53
53
  end
54
54
  self.process(@name)
55
55
  map_template(resource, mapper)
56
- if(!@complete)
57
- return #return if something went wrong
58
- end
56
+ return unless @complete
59
57
  load_data(site)
60
- load_prefixes_yaml()
61
58
  self.data['permalink'] = File.join(@dir, @name) #overwrite permalinks to stop them from interfering with JekyllRdfs rendersystem
59
+ return unless @complete
60
+ load_prefixes_yaml()
62
61
  resource.page = self
63
62
  resource.site = site
64
63
  site.data['resources'] << resource
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-rdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre.develop.402
4
+ version: 3.0.0.pre.develop.411
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elias Saalmann
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
- date: 2018-05-03 00:00:00.000000000 Z
20
+ date: 2018-05-06 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: linkeddata
@@ -151,6 +151,20 @@ dependencies:
151
151
  - - "~>"
152
152
  - !ruby/object:Gem::Version
153
153
  version: '3.4'
154
+ - !ruby/object:Gem::Dependency
155
+ name: jekyll-theme-jod
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: 0.1.5
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: 0.1.5
154
168
  description: Generate static sites with Jekyll based on RDF data
155
169
  email: arndt@informatik.uni-leipzig.de
156
170
  executables: []