Skip to content

Commit

Permalink
Hide devices if url is not in pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Demon000 committed Mar 24, 2024
1 parent 16a8f1c commit c511619
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 1 deletion.
121 changes: 121 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,128 @@ exclude:
- pages/info/

include:
- pages/info/addison.md
- pages/info/albus.md
- pages/info/alphaplus.md
- pages/info/aura.md
- pages/info/bacon.md
- pages/info/beast.md
- pages/info/beckham.md
- pages/info/berkeley.md
- pages/info/berlin.md
- pages/info/berlna.md
- pages/info/betalm.md
- pages/info/bonito.md
- pages/info/charlotte.md
- pages/info/chef.md
- pages/info/cheryl.md
- pages/info/coral.md
- pages/info/deadpool.md
- pages/info/deb.md
- pages/info/debx.md
- pages/info/dopinder.md
- pages/info/dragon.md
- pages/info/DRG.md
- pages/info/dubai.md
- pages/info/ether.md
- pages/info/evert.md
- pages/info/flame.md
- pages/info/flo.md
- pages/info/flox.md
- pages/info/foster.md
- pages/info/foster_tab.md
- pages/info/foster_tab_variant1.md
- pages/info/foster_tab_variant2.md
- pages/info/foster_variant1.md
- pages/info/foster_variant2.md
- pages/info/fugu.md
- pages/info/galen.md
- pages/info/galen_tab.md
- pages/info/griffin.md
- pages/info/h830.md
- pages/info/h850.md
- pages/info/h870.md
- pages/info/h872.md
- pages/info/h910.md
- pages/info/h918.md
- pages/info/h990.md
- pages/info/hltechn.md
- pages/info/hltekor.md
- pages/info/hlte.md
- pages/info/hltetmo.md
- pages/info/ingot.md
- pages/info/jactivelte.md
- pages/info/jflteatt.md
- pages/info/jfltespr.md
- pages/info/jfltevzw.md
- pages/info/jfltexx.md
- pages/info/jfvelte.md
- pages/info/kane.md
- pages/info/kane_variant1.md
- pages/info/kane_variant2.md
- pages/info/klteactivexx.md
- pages/info/klteaio.md
- pages/info/kltechnduo.md
- pages/info/kltechn.md
- pages/info/klteduos.md
- pages/info/kltedv.md
- pages/info/kltekdi.md
- pages/info/kltekor.md
- pages/info/klte.md
- pages/info/lake.md
- pages/info/loki.md
- pages/info/ls997.md
- pages/info/m5.md
- pages/info/m5_tab.md
- pages/info/m8d.md
- pages/info/m8.md
- pages/info/marlin.md
- pages/info/mata.md
- pages/info/mdarcy.md
- pages/info/mdarcy_tab.md
- pages/info/messi.md
- pages/info/mh2lm.md
- pages/info/mh2lm_variant1.md
- pages/info/mh2lm_variant2.md
- pages/info/mh2lm_variant3.md
- pages/info/nash.md
- pages/info/nash_variant1.md
- pages/info/nash_variant2.md
- pages/info/nio_variant1.md
- pages/info/nio_variant2.md
- pages/info/ocean.md
- pages/info/odroidc4.md
- pages/info/odroidc4_tab.md
- pages/info/payton.md
- pages/info/PL2.md
- pages/info/pro1.md
- pages/info/pro1x.md
- pages/info/pstar.md
- pages/info/radxa0.md
- pages/info/radxa0_tab.md
- pages/info/river.md
- pages/info/sabrina.md
- pages/info/sailfish.md
- pages/info/sargo.md
- pages/info/shamu.md
- pages/info/sif.md
- pages/info/sphynx.md
- pages/info/taimen.md
- pages/info/tangorpro.md
- pages/info/TP1803.md
- pages/info/troika.md
- pages/info/us996d.md
- pages/info/us996.md
- pages/info/us997.md
- pages/info/victara.md
- pages/info/vs995.md
- pages/info/wade.md
- pages/info/walleye.md
- pages/info/xpeng.md
- pages/info/xpeng_variant1.md
- pages/info/xpeng_variant2.md
- pages/info/yellowstone.md


# these are the files and directories that jekyll will exclude from the build

Expand Down
9 changes: 8 additions & 1 deletion pages/devices.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ <h1>{{ page.title }}</h1>
</div>

{%- for device in sorted %}

{%- assign url = "devices/" | append: device.codename | append: "/" | relative_url %}
{%- assign match = site.pages | where: "url", url %}

{%- if match == empty %}
{%- continue %}
{%- endif %}

{%- if device.vendor != lastVendor %}
{%- assign lastVendor = device.vendor %}
{% capture vendorId %}{{ device.vendor | slugify }}{% endcapture %}
Expand All @@ -218,7 +226,6 @@ <h2 class="h2" id="{{ vendorId }}" data-vendor="{{ vendorId }}">{{ device.vendor
<div class="devices" data-vendor="{{ vendorId }}">
{%- endif %}

{%- assign url = "devices/" | append: device.codename | append: "/" | relative_url %}
{%- if device.maintainers == empty %}
{%- assign class="discontinued hidden" %}
{%- else %}
Expand Down

0 comments on commit c511619

Please sign in to comment.