jekyll-attendease 0.6.25g → 0.6.25h

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
  SHA1:
3
- metadata.gz: 470e747753670595a1a19351c61f55935df6c2b6
4
- data.tar.gz: 984d6214e1d28dfbd81d628a9d14c149b06340d6
3
+ metadata.gz: c118c4103cb2090be0214ca7342f8e9a8513e8e7
4
+ data.tar.gz: 302f35f68cf47212ee7ec28755cd757233c76b2e
5
5
  SHA512:
6
- metadata.gz: e6fe0b36536b62641bac5a058fc5d73661a7e2016fbe47559387cd9f74ca4f2ab923b7df2632de477aa7029bce4d2ed0156bebd3633fa9128adfcb0e31cc759b
7
- data.tar.gz: cba01fc046ea07bf0e046e1ea0888bf2da787ea35c36e6b8f3504190876938366677fd1611657e40ea1cc5566811599fb4cf56ae28ece9b6c13f634c06c12727
6
+ metadata.gz: f9f6658bc4cc0df48d2adc0fbb5451018332afb365eedc8b215d2626ea1d4b33b0f1be84b7c0f2d7e1ce95644ac7b58938716f181bfeb1235ab05d6bc4ead11b
7
+ data.tar.gz: 51204b7a88d70c84055a04f4e04ac39388cda6a3cc2ac3cbee8f7886967d974785a1f30dc1a487c53711aefeae537c4a4a95e7a9d141342b57305a3759ea0347
@@ -34,7 +34,10 @@ module Jekyll
34
34
 
35
35
  FileUtils.mkdir_p(@attendease_data_path)
36
36
 
37
- data_files = %w{ site event sessions presenters rooms filters venues sponsors pages }.map { |m| "#{m}.json"} << 'lingo.yml'
37
+ data_files = %w{ site event sessions presenters rooms filters venues sponsors pages site_settings }.map { |m| "#{m}.json"} << 'lingo.yml'
38
+
39
+ # no more site in nextgen themes
40
+ #data_files.shift if @attendease_config['jekyll33']
38
41
 
39
42
  data_files.each do |file_name|
40
43
  update_data = true
@@ -0,0 +1,42 @@
1
+ module Jekyll
2
+ module AttendeasePlugin
3
+ class SitePageBlocksJson < StaticFile
4
+ def initialize(site, base, page)
5
+ @site = site
6
+ @base = base
7
+ @dir = page['slug']
8
+ @name = 'index.json'
9
+
10
+ self.process(@name)
11
+
12
+ #require 'pry'
13
+ #binding.pry
14
+ #self.read_yaml(File.join(base, '_attendease', 'templates', 'pages'), 'default.html')
15
+ self.read_yaml(File.join(base, '_layouts'), "#{page['layout']}.html")
16
+
17
+ self.data['title'] = page['title']
18
+ self.data['layout'] = page['layout']
19
+
20
+ zones = {}
21
+
22
+ # create zone buckets
23
+ page['block_instances'].each do |i|
24
+ zones[i['zone']] = [] if zones[i['zone']].nil?
25
+ zones[i['zone']] << i
26
+ end
27
+
28
+ # sort each bucket by widget weight
29
+ zones.each do |k, zone|
30
+ zone.sort! { |x, y| x['weight'] <=> y['weight'] }
31
+ self.data[k] = ''
32
+ zone.each do |i|
33
+ self.data[k] << i['rendered_html']
34
+ end
35
+ end
36
+
37
+ self.data['site_page'] = page
38
+ end
39
+ end
40
+ end
41
+ end
42
+
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = '0.6.25g'
3
+ VERSION = '0.6.25h'
4
4
  end
5
5
  end
@@ -51,6 +51,11 @@ RSpec.describe Jekyll::AttendeasePlugin::EventDataGenerator do
51
51
  expect(@site.data['event'].class).to eq(Hash)
52
52
  end
53
53
 
54
+ it 'populates a site wide settings object' do
55
+ expect(@site.data['site_settings'].class).to eq(Hash)
56
+ expect(@site.data['site_settings']['look_and_feel']['body_font_family']).to eq('serif')
57
+ end
58
+
54
59
 
55
60
  end
56
61
 
data/spec/spec_helper.rb CHANGED
@@ -95,7 +95,7 @@ RSpec.configure do |config|
95
95
  @dest.rmtree if @dest.exist?
96
96
  fixtures_path.join('_attendease', 'templates').rmtree if File.exists?(fixtures_path.join('_attendease', 'templates'))
97
97
  fixtures_path.join('attendease_layouts').rmtree if File.exists?(fixtures_path.join('attendease_layouts'))
98
- Dir.glob(File.join(@source, '**', 'index.json')).map do |i|
98
+ Dir.glob(File.join(@site.source, '**', 'index.json')).map do |i|
99
99
  puts "Removing #{Pathname.new(i).parent}"
100
100
 
101
101
  FileUtils.rm_r Pathname.new(i).parent
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-attendease
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.25g
4
+ version: 0.6.25h
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood
@@ -180,6 +180,7 @@ files:
180
180
  - lib/jekyll/attendease_plugin/schedule_session_page.rb
181
181
  - lib/jekyll/attendease_plugin/schedule_sessions_page.rb
182
182
  - lib/jekyll/attendease_plugin/site_page.rb
183
+ - lib/jekyll/attendease_plugin/site_page_blocks_json.rb
183
184
  - lib/jekyll/attendease_plugin/site_pages_generator.rb
184
185
  - lib/jekyll/attendease_plugin/sponsor_generator.rb
185
186
  - lib/jekyll/attendease_plugin/sponsors_index_page.rb