-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdato.config.rb
109 lines (88 loc) · 2.83 KB
/
dato.config.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
directory "_data/" do
create_data_file "clusters.yml", :yaml,
dato.clusters.map(&:to_hash)
create_data_file "slides.yml", :yaml,
dato.slides.map(&:to_hash)
create_data_file "program_data_charts.yml", :yaml,
dato.program_data_charts.map(&:to_hash)
create_data_file "small_slides.yml", :yaml,
dato.small_slides.map(&:to_hash)
create_data_file "plans.yml", :yaml,
dato.plans.map(&:to_hash)
create_data_file "participants.yml", :yaml,
dato.participants.map(&:to_hash)
create_data_file "small_description.yml", :yaml, {
content: dato.small_description.content
}
create_data_file "contacto.yml", :yaml, {
email: dato.contacto.email,
phone: dato.contacto.phone,
address: dato.contacto.address
}
create_data_file "construction.yml", :yaml, {
total_population: dato.construction.total_population,
automoviles: dato.construction.automoviles,
total_lot_areas: dato.construction.total_lot_areas,
total_building_area: dato.construction.total_building_area,
airport_building_area: dato.construction.airport_building_area,
airport_lot_area: dato.construction.airport_lot_area,
future_development_area: dato.construction.future_development_area,
imagen: dato.construction.imagen.url
}
end
directory "_about/" do
intoduction_sections = []
dato.introduction.secciones.each do |section|
intoduction_sections << "\#\# #{section.title}\n{: .pull-right .txt-img }#{section.text}\n\n"
end
create_post "introduction.md" do
frontmatter(:yaml, {
title: dato.introduction.title,
subtitle: dato.introduction.subtitle
})
content(intoduction_sections.join)
end
create_post "executive-summary.md" do
frontmatter :yaml,
title: "Executive Summary",
subtitle: dato.executive_summary.subtitle,
weight: 2
content dato.executive_summary.content
end
create_post "plans.md" do
frontmatter :yaml,
title: "Plans",
subtitle: "How we envision Punta Perla Pacífico",
layout: "plans",
weight: 3
end
create_post "program-data.md" do
frontmatter :yaml,
title: "Program data - Smart City",
subtitle: "How we envision Punta Perla Pacífico",
layout: "program-data",
weight: 4
end
end
directory "_participants/" do
count = 0
dato.participants.each do |participant|
create_post "#{participant.name.parameterize}.md" do
frontmatter :yaml,
title: participant.name,
description: participant.description,
order: count
end
count += 1
end
end
directory "_clusters/" do
dato.clusters.each do |cluster|
create_post "#{cluster.title.parameterize}.md" do
frontmatter :yaml,
title: cluster.title,
description: cluster.long_description,
images: cluster.images
end
end
end