From afcbfb30f0e069151e1a1dff099ecb509117c6e6 Mon Sep 17 00:00:00 2001 From: duncathan Date: Thu, 9 May 2024 13:11:36 -0600 Subject: [PATCH] fix noindex on game/vid pages ooops --- _includes/head.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index 1530da3b..60056135 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -3,9 +3,21 @@ - {%- if page.noindex or page.collection == 'games' and page.development-state != stable -%} + {%- assign dev-state = 'stable' -%} + {%- if page.collection == 'games' -%} + {%- assign dev-state = page.development-state -%} + {%- elsif page.collection == 'videos' -%} + {%- for game in site.games -%} + {%- if game.slug == page.slug -%} + {%- assign dev-state = game.development-state -%} + {%- break -%} + {%- endif -%} + {%- endfor -%} + {%- endif %} + + {% if page.noindex or dev-state != "stable" -%} - {%- endif -%} + {%- endif %} {% include seo.html %}