Mustache has does not have logic, from the docs:
We call it "logic-less" because there are no if statements, else
clauses, or for loops. Instead there are only tags. Some tags are
replaced with a value, some nothing, and others a series of values.
This document explains the different types of Mustache tags.
So what you essentially want is a mechanism to do an if link is the first
- so you can handle this on the data side, by only putting 1 element in your data, or by adding a chunk of data like when you're putting your data in you add a value like display
and set it to 'inline' or 'none' then in your template do:
{{# links}}<a href="{{& url}}" style="display: {{display}};">{{& title }}</a>{{/ links}}
Then, later, you can call scripting in page to change the style.display
on some user or application action.
Those are my first though it may simply be easier to set data = data[0]
for this particular template. The problem is you probably WANT to use that whole list at some point, to comment on that I'd need to see more your usage and where the data's populating from.