Skip to content

Commit

Permalink
Merge pull request #62 from randovania/fix/noindex
Browse files Browse the repository at this point in the history
fix noindex on game/vid pages ooops
  • Loading branch information
duncathan authored May 9, 2024
2 parents 3e7f849 + afcbfb3 commit 325a5ff
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

{%- 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" -%}
<meta name="robots" content="noindex" />
{%- endif -%}
{%- endif %}

{% include seo.html %}

Expand Down

0 comments on commit 325a5ff

Please sign in to comment.