--- pagination: data: collections.postsBySlug size: 1 alias: slugData resolve: keys permalink: /post/{{ slugData }}/ layout: base.njk --- {% set posts = collections.postsBySlug[slugData] %} {% if posts.length == 1 %} {# Single post - redirect to the dated version #}

Redirecting to {{ posts[0].data.title }}...

{% else %} {# Multiple posts with same title - show disambiguation page #}

{{ posts[0].data.title }}

There are multiple posts with this title. Please select the one you're looking for:

{% endif %}