How to pass a list of pages to a shortcode?

Ok, solved this by duplicating the markup:

{{ if .Params }}
<section class="related">
    <h2>See also:</h2>
    <ul>
        {{ range .Params }}{{ with $.Site.GetPage . }}
        <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
        {{ end }}{{ end }}
    </ul>
</section>
{{ else }}
{{ with .Site.RegularPages.Related .Page | first 5 }}
<section class="related">
    <h2>See also:</h2>
    <ul>
        {{ range . }}
        <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
        {{ end }}
    </ul>
</section>
{{ end }}
{{ end }}

The shorcode could be used as follows:

  1. Automatic related posts
{{< related >}}
  1. Explicit related posts
{{< related "post1" "post2" />}}