{%- assign series = include.series -%} {%- assign games = "" | split: "" -%} {%- for game in include.series.games -%} {%- assign games = games | push: game[0] -%} {%- endfor -%} {%- assign games = games | sort_natural -%}

{% if games.size == 1 %} {%- assign firstGame = games[0] -%} {%- assign game_data = series.games[firstGame] -%} {%- assign release_year = game_data.release-date | split: "-" | first -%} {{ firstGame }} {% if release_year %} ({{ release_year }}) {% endif %} {%- comment -%} Series with a different name to the sole game within will have their title appended {%- endcomment -%} {% if firstGame != series.name %} {{ series.name }} {% endif %} {% else %} {{ series.name }} {% endif %}

{%- if series.comment -%}

{{ series.comment | markdownify }}

{%- endif -%}