Adjust templates layout for hugo 0.146, potentially breaking change

This commit is contained in:
Alex Shpak
2025-05-31 01:38:33 +02:00
parent 24d3465980
commit f2c703e155
45 changed files with 5 additions and 11 deletions
+12
View File
@@ -0,0 +1,12 @@
{{- $ref := "" }}
{{- $target := "" -}}
{{- with .Get "href" -}}
{{- $ref = . -}}
{{- $target = "_blank" -}}
{{- end -}}
{{- with .Get "relref" -}}
{{- $ref = relref $ . -}}
{{- end -}}
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
{{- .InnerDeindent -}}
</a>