conditionally show link if github package.yml exists

This commit is contained in:
neil 2022-12-07 13:25:42 +08:00
parent d7461ba8ca
commit 7cef557065

View file

@ -14,9 +14,11 @@
<h3>{{- .Title -}}</h3>
{{ range where $.Site.Data.packages "name" .Title }}
<p class="one-box-down">{{- .desc -}}</p>
<a target="_blank" href="{{- .homepage -}}">
{{ if not (eq .package_yml_url "#")}}
<a target="_blank" href="{{- .package_yml_url -}}">
<button class="detail-btn-large me-3" id="purple-bg-btn"><i class="icon-enter-arrow"></i>View on GitHub</button>
</a>
{{end}}
{{ if not (eq .homepage "") }}
<a target="_blank" href="{{- .homepage -}}">
<button class="detail-btn-large" id="standard-detail-btn"><i class="icon-enter-arrow"></i>Visit package home</button>