ndarville / goal-tracker

Track the goals, promises, and predictions of those we want to hold accountable. Inspired by <trudeaumetre.ca>
https://ndarville.github.io/goal-tracker/
6 stars 0 forks source link

Goal pages #8

Open ndarville opened 8 years ago

ndarville commented 8 years ago

Naming options:

ndarville commented 8 years ago

Code

_config.yml

collections:
    goals:
        output: true
        permalink: /goal/:path/index.html
        defaults:
            scope:
                path: ""
                type: collection
            values:
                layout: goal # Dun work

wip.yml etc

- short: Transparent pollution data
  topic: Environment
  slug: pollution-data

index.html

{% for goal in goals[type] %}{% if goal.topic == topic %}
    <tr class="{{ type }}">
{% if goal.slug %}
        <td><a href="/goal/{{ goal.slug }}">{{ goal.short }}</a></td>
{% else %}
        <td><a>{{ goal.short }}</a></td>
{% endif %}
        <td>{{ type }}</td>
    </tr>
{% endif %}{% endfor %}

_goals/pollution-data.markdown

---
layout: goal
---
ndarville commented 8 years ago

Template

ndarville commented 8 years ago