Skip to content

Commit

Permalink
better sort
Browse files Browse the repository at this point in the history
  • Loading branch information
blakadder committed Feb 7, 2020
1 parent faf4f7c commit d9ae9b0
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deconz.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h2>{{ page.title }}</h2>
<!-- ###################################################################### -->
{% assign compatibility = site.zigbee | where: "compatible", "deconz" %}
{% assign gateway = site.zigbee | where: "category", "light" | concat: compatibility | uniq %}
{% assign types = gateway | group_by: 'category' | sort: "name" %}
{% assign types = gateway | group_by: 'category' | sort_natural: "name" %}
{% for type in types %}
<h3> {{ type.name | capitalize }} </h3>
<table>
Expand Down
2 changes: 1 addition & 1 deletion iobroker.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>{{ page.title }}</h2>
How to set up <a href="https://github.com/ioBroker/ioBroker.zigbee" target="_blank">ioBroker.zigbee</a>.
<!-- ###################################################################### -->
{% assign gateway = site.zigbee | where: "compatible", "iob" %}
{% assign types = gateway | group_by: 'category' | sort: "name" %}
{% assign types = gateway | group_by: 'category' | sort_natural: "name" %}
{% for type in types %}
<h3> {{ type.name | capitalize }} </h3>
<table>
Expand Down
4 changes: 2 additions & 2 deletions vendors.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<h2>{{ page.title }}</h2>
<!-- ###################################################################### -->
{% assign gateway = site.zigbee %}
{% assign types = gateway | group_by: 'vendor' | sort: "name" %}
{% assign types = gateway | group_by: 'vendor' | sort_natural: "name" %}
{% for type in types %}
<h3> {{ type.name }} </h3>
<table>
<tbody>
{% assign vendor = type.items | group_by: 'vendor' %}
{% assign vendors = vendor | sort: 'name' %}
{% assign vendors = vendor | sort_natural: 'name' %}
{% for type in vendors %}
{% assign type_sorted = type.items | sort_natural: 'title' %}
{% for template in type_sorted %}
Expand Down
2 changes: 1 addition & 1 deletion zha.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h2>{{ page.title }}</h2>
<!-- ###################################################################### -->
{% assign compatibility = site.zigbee | where: "compatible", "zha" %}
{% assign gateway = site.zigbee | where: "category", "light" | concat: compatibility | uniq %}
{% assign types = gateway | group_by: 'category' | sort: "name" %}
{% assign types = gateway | group_by: 'category' | sort_natural: "name" %}
{% for type in types %}
<h3> {{ type.name | capitalize }} </h3>
<table>
Expand Down
2 changes: 1 addition & 1 deletion zigate.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>{{ page.title }}</h2>
How to set up <a href="https://zigate.fr/" target="_blank">ZiGate</a>.
<!-- ###################################################################### -->
{% assign gateway = site.zigbee | where: "compatible", "zigate" %}
{% assign types = gateway | group_by: 'category' | sort: "name" %}
{% assign types = gateway | group_by: 'category' | sort_natural: "name" %}
{% for type in types %}
<h3> {{ type.name | capitalize }} </h3>
<table>
Expand Down
2 changes: 1 addition & 1 deletion zigbee2mqtt.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>{{ page.title }}</h2>
How to set up <a href="https://www.zigbee2mqtt.io/" target="_blank">Zigbee2MQTT</a>.
<!-- ###################################################################### -->
{% assign gateway = site.zigbee | where: "compatible", "z2m" %}
{% assign types = gateway | group_by: 'category' | sort: "name" %}
{% assign types = gateway | group_by: 'category' | sort_natural: "name" %}
{% for type in types %}
<h3> {{ type.name | capitalize }} </h3>
<table>
Expand Down
2 changes: 1 addition & 1 deletion zigbee2tasmota.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h2>{{ page.title }}</h2>
<!-- ###################################################################### -->
{% assign compatibility = site.zigbee | where: "compatible", "tasmota" %}
{% assign gateway = site.zigbee | where: "category", "light" | concat: compatibility | uniq %}
{% assign types = gateway | group_by: 'category' | sort: "name" %}
{% assign types = gateway | group_by: 'category' | sort_natural: "name" %}
{% for type in types %}
<h3> {{ type.name | capitalize }} </h3>
<table>
Expand Down

0 comments on commit d9ae9b0

Please sign in to comment.