jekyll-attendease 0.6.25f → 0.6.25g
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 470e747753670595a1a19351c61f55935df6c2b6
|
4
|
+
data.tar.gz: 984d6214e1d28dfbd81d628a9d14c149b06340d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6fe0b36536b62641bac5a058fc5d73661a7e2016fbe47559387cd9f74ca4f2ab923b7df2632de477aa7029bce4d2ed0156bebd3633fa9128adfcb0e31cc759b
|
7
|
+
data.tar.gz: cba01fc046ea07bf0e046e1ea0888bf2da787ea35c36e6b8f3504190876938366677fd1611657e40ea1cc5566811599fb4cf56ae28ece9b6c13f634c06c12727
|
@@ -31,6 +31,20 @@ module Jekyll
|
|
31
31
|
File.open(base_layout_file, 'w+') { |f| f.write("{{ content }}") }
|
32
32
|
end
|
33
33
|
|
34
|
+
cms_layouts = []
|
35
|
+
begin
|
36
|
+
Dir.glob(File.join(layouts_path, '*.html')).each do |l|
|
37
|
+
html = File.read(l)
|
38
|
+
if html =~ %r!\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)!m
|
39
|
+
data = YAML.load(Regexp.last_match(1))
|
40
|
+
if data['cms_layout']
|
41
|
+
cms_layouts << File.basename(l).split('.').first
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
rescue
|
46
|
+
end
|
47
|
+
|
34
48
|
layouts_to_precompile = %w{ layout register surveys } # These are compiled to the html site.
|
35
49
|
layouts_to_precompile.each do |layout|
|
36
50
|
# create a layout file if it already doesn't exist.
|
@@ -42,6 +56,9 @@ module Jekyll
|
|
42
56
|
end
|
43
57
|
end
|
44
58
|
|
59
|
+
cms_layouts.each do |layout|
|
60
|
+
site.pages << EventLayoutPage.new(site, site.source, 'attendease_layouts', "cms-#{layout}.html", layout, layout.capitalize)
|
61
|
+
end
|
45
62
|
|
46
63
|
# Precompiled layouts for attendease email
|
47
64
|
base_email_layout = site.config['attendease']['base_email_layout'] || 'email'
|
@@ -13,6 +13,7 @@ RSpec.describe Jekyll::AttendeasePlugin::SitePagesGenerator do
|
|
13
13
|
file = File.join(@site.config['destination'], slug, 'index.html')
|
14
14
|
expect(File.exists?(file)).to eq(true)
|
15
15
|
expect(File.file?(file)).to eq(true)
|
16
|
+
expect(File.read(file)).to include '<title>Test Page</title>'
|
16
17
|
end
|
17
18
|
|
18
19
|
it 'creates a block instance json file using the provided slug' do
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<div class="attendease-venue" data-venue-id="{{ venue.id }}">
|
10
10
|
|
11
|
-
{% if venue.address.latitude
|
11
|
+
{% if venue.address.latitude and venue.address.longitude %}
|
12
12
|
{% if venue.primary %}
|
13
13
|
{% assign marker_colour = 'blue' %}
|
14
14
|
{% else %}
|