I’m using the shortcode layouts/_default/shortcodes/mytag-recent-post.html
in posts:
<!-- mytag-recent-post -->
{{ range first 1 .Site.Taxonomies.tags.mytag }}
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a>
{{ end }}
And that {{< mytag-recent-post >}}
shows the link to the latest post tagged “MyTag.”
But if there are no existing posts tagged “MyTag”, I get "error calling first: both limit and seq must be provided.”
How can I first determine if there are any existing posts tagged MyTag, and if there is one, show the link, but if there are none, show no link?