Skip to content
This repository was archived by the owner on Dec 28, 2021. It is now read-only.

Commit 7e4aad0

Browse files
committed
Use workaround for collection ordering
* github/pages-gem#651
1 parent 35e31f6 commit 7e4aad0

File tree

3 files changed

+45
-36
lines changed

3 files changed

+45
-36
lines changed

_includes/services/list.html

+39-35
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,43 @@
11
<!-- Services List Section -->
22
<div id="services" class="services">
3-
{% for post in site.services %}
4-
<section id="{{ post.slug }}" class="service-item">
5-
<div class="container">
6-
<div class="row">
7-
<div class="col">
8-
<h2 class="section-heading">
9-
{{ post.title }}
10-
</h2>
11-
</div>
12-
</div>
13-
<div class="row justify-content-between">
14-
<div class="col-md-6">
15-
<h3 class="section-subheading text-muted mb-5">
16-
{{ post.description }}
17-
</h3>
18-
<br />
19-
<a href="{{ post.url | prepend: site.baseurl }}" class="">
20-
Learn more about {{ post.title }}
21-
</a>
22-
</div>
23-
<div class="col-md-5">
24-
<h4>Related projects</h4>
25-
<ul>
26-
{% for project in post.related-projects %}
27-
<li>
28-
<a href="/case-studies{{ project[1] }}">
29-
{{ project[0] | capitalize}}
30-
</a>
31-
</li>
32-
{% endfor %}
33-
</ul>
34-
</div>
35-
</div>
36-
</div>
37-
</section>
3+
{% for post in page.services %}
4+
{% for ordered_post in site.services in %}
5+
{% if post == ordered_post.slug %}
6+
<section id="{{ ordered_post.slug }}" class="service-item">
7+
<div class="container">
8+
<div class="row">
9+
<div class="col">
10+
<h2 class="section-heading">
11+
{{ ordered_post.title }}
12+
</h2>
13+
</div>
14+
</div>
15+
<div class="row justify-content-between">
16+
<div class="col-md-6">
17+
<h3 class="section-subheading text-muted mb-5">
18+
{{ ordered_post.description }}
19+
</h3>
20+
<br />
21+
<a href="{{ ordered_post.url | prepend: site.baseurl }}" class="">
22+
Learn more about {{ ordered_post.title }}
23+
</a>
24+
</div>
25+
<div class="col-md-5">
26+
<h4>Related projects</h4>
27+
<ul>
28+
{% for project in ordered_post.related-projects %}
29+
<li>
30+
<a href="/case-studies{{ project[1] }}">
31+
{{ project[0] | capitalize}}
32+
</a>
33+
</li>
34+
{% endfor %}
35+
</ul>
36+
</div>
37+
</div>
38+
</div>
39+
</section>
40+
{%endif%}
41+
{% endfor %}
3842
{% endfor %}
3943
</div>

_services/systems-architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Systems Architecture
33
layout: service_post
44
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus varius nisl vitae elit imperdiet laoreet. Curabitur nec turpis eu dolor scelerisque commodo ac in lacus. Donec auctor nibh dui, a mattis velit convallis ac. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nam tristique volutpat velit, ac gravida erat placerat in.
5-
slug: project-rescue
5+
slug: systems-architecture
66
related-projects:
77
essayjack: '/essayjack'
88
fullslate: '/fullslate'

pages/services.html

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
title: Services
33
layout: full_page
44
permalink: /services/
5+
services:
6+
- project-rescue
7+
- custom-software-development
8+
- systems-architecture
9+
- data-engineering
510
---
611

712
<div class="services-page">

0 commit comments

Comments
 (0)