mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 03:36:41 +02:00
Fix hacker news and lobsters link condition
Prevents a link from being generated when the parameters are set to the empty string, addrssing #69
This commit is contained in:
@@ -25,11 +25,15 @@
|
||||
<div class="tags">
|
||||
<ul>
|
||||
{{ if isset .Params "hacker_news_id" }}
|
||||
{{ if ne .Params.hacker_news_id "" }}
|
||||
<li class="middot"><a href="https://news.ycombinator.com/item?id={{ .Params.hacker_news_id }}">Hacker News</a> </li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if isset .Params "lobsters_id" }}
|
||||
{{ if ne .Params.lobsters_id "" }}
|
||||
<li class="middot"><a href="https://lobste.rs/s/{{ .Params.lobsters_id }}">Lobsters</a> </li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user