Use a collection for coops instead of data file

This commit is contained in:
Chris Roos 2017-06-27 14:58:29 +01:00
parent 38ff063158
commit 549156c82b
7 changed files with 29 additions and 7 deletions

9
_config.yml Normal file
View File

@ -0,0 +1,9 @@
collections:
coops:
output: true
permalink: /co-op/:name
defaults:
- scope:
type: coops
values:
layout: co-op

View File

@ -0,0 +1,4 @@
---
name: Agile Collective
website: http://agile.coop
---

4
_coops/go-free-range.md Normal file
View File

@ -0,0 +1,4 @@
---
name: Go Free Range
website: http://gofreerange.com
---

4
_coops/outlandish.md Normal file
View File

@ -0,0 +1,4 @@
---
name: Outlandish
website: http://outlandish.com
---

View File

@ -1,4 +0,0 @@
name,website
Agile Collective,http://agile.coop/
Go Free Range,http://gofreerange.com
Outlandish,http://outlandish.com
1 name website
2 Agile Collective http://agile.coop/
3 Go Free Range http://gofreerange.com
4 Outlandish http://outlandish.com

5
_layouts/co-op.html Normal file
View File

@ -0,0 +1,5 @@
---
---
<h1>{{ page.name }}</h1>
<a href="{{ page.website }}">{{ page.name }}</a>

View File

@ -3,10 +3,10 @@ title: CoTech
--- ---
<ul> <ul>
{% for member in site.data.members %} {% for coop in site.coops %}
<li> <li>
<a href="{{ member.website }}"> <a href="{{ coop.url }}">
{{ member.name }} {{ coop.name }}
</a> </a>
</li> </li>
{% endfor %} {% endfor %}