mirror of
https://github.com/imfing/hextra.git
synced 2025-07-07 02:37:18 -04:00
docs(chore): switch to new template system (Hugo v0.146.0) (#681)
This commit is contained in:

committed by
GitHub

parent
41140af6fa
commit
c497ef700e
11
exampleSite/layouts/_shortcodes/new-feature.html
Normal file
11
exampleSite/layouts/_shortcodes/new-feature.html
Normal file
@ -0,0 +1,11 @@
|
||||
{{- $version := .Get "version" | default "" -}}
|
||||
{{- $icon := .Get "icon" | default "" -}}
|
||||
{{- $defaultLink := cond (eq $version "") "https://github.com/imfing/hextra/tree/main" (printf "https://github.com/imfing/hextra/releases/tag/%s" $version) -}}
|
||||
{{- $link := .Get "link" | default $defaultLink -}}
|
||||
{{- $content := cond (eq $version "") "New in main branch" (printf "New in %s" $version) -}}
|
||||
|
||||
<div style="margin-top: 1rem; display: inline-flex;">
|
||||
<a href="{{ $link }}" title="{{ $link | plainify }}" target="_blank">
|
||||
{{- partial "shortcodes/badge" (dict "content" $content "border" true "icon" $icon) -}}
|
||||
</a>
|
||||
</div>
|
Reference in New Issue
Block a user