Skip to content

Commit b78b8c8

Browse files
committed
Dynamic feature list creation using _confiq.yml and Liquid
1 parent a08ad51 commit b78b8c8

File tree

2 files changed

+14
-84
lines changed

2 files changed

+14
-84
lines changed

_config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ collections:
1010
posts:
1111
output : true
1212

13+
# Features
14+
features :
15+
- title : 'First Feature'
16+
description : 'A good description'
17+
fontawesome_icon_name : adjust
18+
- title : 'Another feature'
19+
description : 'Another good description'
20+
fontawesome_icon_name : mobile
21+
1322
# Handling Reading
1423
safe : false
1524
include : [".htaccess", "_pages"]

_includes/features.html

Lines changed: 5 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,24 @@
11
<div class="features">
2-
<div class="feature">
3-
<div>
4-
<span class="fa-stack fa-1x">
5-
<i class="iconBack fas fa-circle fa-stack-2x"></i>
6-
<i class="iconTop fas fa-mobile fa-stack-1x"></i>
7-
</span>
8-
</div>
9-
<div class="featureText">
10-
<h4>
11-
Feature 1
12-
</h4>
13-
<p>
14-
Use Siri Shortcuts and x-callback-url for automation.
15-
</p>
16-
</div>
17-
</div>
182

19-
<div class="feature">
20-
<div>
21-
<span class="fa-stack fa-1x">
22-
<i class="iconBack fas fa-circle fa-stack-2x"></i>
23-
<i class="iconTop fas fa-adjust fa-stack-1x"></i>
24-
</span>
25-
</div>
26-
<div class="featureText">
27-
<h4>
28-
Feature 2
29-
</h4>
30-
<p>
31-
Kiwi that well dolphin alas this the mindfully jeepers.
32-
</p>
33-
</div>
34-
</div>
35-
36-
<div class="feature">
37-
<div>
38-
<span class="fa-stack fa-1x">
39-
<i class="iconBack fas fa-circle fa-stack-2x"></i>
40-
<i class="iconTop fas fa-cloud fa-stack-1x"></i>
41-
</span>
42-
</div>
43-
<div class="featureText">
44-
<h4>
45-
Feature 3
46-
</h4>
47-
<p>
48-
One preparatory up less therefore hello oh amid.
49-
</p>
50-
</div>
51-
</div>
3+
{% for feature in site.features %}
524

535
<div class="feature">
546
<div>
557
<span class="fa-stack fa-1x">
568
<i class="iconBack fas fa-circle fa-stack-2x"></i>
57-
<i class="iconTop fas fa-expand-arrows-alt fa-stack-1x"></i>
9+
<i class="iconTop fas fa-{{ feature.fontawesome_icon_name }} fa-stack-1x"></i>
5810
</span>
5911
</div>
6012
<div class="featureText">
6113
<h4>
62-
Feature 3
14+
{{ feature.title }}
6315
</h4>
6416
<p>
65-
Use Siri Shortcuts and x-callback-url for automation.
17+
{{ feature.description }}
6618
</p>
6719
</div>
6820
</div>
6921

70-
<div class="feature">
71-
<div>
72-
<span class="fa-stack fa-1x">
73-
<i class="iconBack fas fa-circle fa-stack-2x"></i>
74-
<i class="iconTop fas fa-history fa-stack-1x"></i>
75-
</span>
76-
</div>
77-
<div class="featureText">
78-
<h4>
79-
Feature 5
80-
</h4>
81-
<p>
82-
Use Siri Shortcuts and x-callback-url for automation.
83-
</p>
84-
</div>
85-
</div>
22+
{% endfor %}
8623

87-
<div class="feature">
88-
<div>
89-
<span class="fa-stack fa-1x">
90-
<i class="iconBack fas fa-circle fa-stack-2x"></i>
91-
<i class="iconTop fas fa-database fa-stack-1x"></i>
92-
</span>
93-
</div>
94-
<div class="featureText">
95-
<h4>
96-
Feature 6
97-
</h4>
98-
<p>
99-
Use Siri Shortcuts and x-callback-url for automation.
100-
</p>
101-
</div>
102-
</div>
10324
</div>

0 commit comments

Comments
 (0)