{% for link in docs %}
<a href="/{{link.slug}}/" class="_list-item _icon-{{link.slug | split: '~' | first }} _list-dir" title="">
<img src="/images/docs/{{link.slug | split: '~' | first }}.png" alt=""><span class="name">{{link.name}}{%if link.version and link.version != '' %}~{{link.version}}{%endif%}
</span></a>
{% endfor %}
[
{"name":"Angular","slug":"angular","type":"angular","links":{"home":"https://angular.io/","code":"https://github.com/angular/angular"},
"version":"","release":"5.0.1","mtime":1510333264,"db_size":8769411},
{"name":"Angular","slug":"angular~4","type":"angular","links":{"home":"https://angular.io/","code":"https://github.com/angular/angular"},
"version":"4","release":"4.4.6","mtime":1510333140,"db_size":8247972}
]
but the follow is ok.
{%if link.version %}{%if link.version != '' %}~{{link.version}}{%endif%}{%endif%}
docs data:
catch error
may
andoperator case this, i am not sure.but the follow is ok.