This has to be simple
How can I show a link to the most recent post that has the tag MyTag?
This in /layouts/_default/recentposts.html
throws the “error calling first: both limit and seq must be provided” error:
{{ range first 1 .Site.Taxonomies.tags.MyTag }}
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a>
{{ end }}
{{ range first 1 .Site.Taxonomies.tags.mytag }}
Use lower case for the identifier.
Thanks! I should have realized that
Actually, when I remove MyTag from the header in mypost.md, I still get a link, and it’s to the most recent of all posts. So it seems like I need something like “if a post with the tag MyTag exists”.
Is that a question? If yes, I’d need more context, like seeing the repository.
system
Closed
August 13, 2023, 1:17am
6
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.