Introduce expandable image shortcode, improve portable links logic

This commit is contained in:
Alex Shpak
2025-09-08 20:04:04 +02:00
parent dbaaa516e8
commit 249682f9dd
13 changed files with 191 additions and 68 deletions
+2 -2
View File
@@ -10,8 +10,8 @@
<ul>
{{ range . }}
<li>
{{ $local := or (.Page) (strings.HasPrefix .URL "/") }}
<a href="{{ .URL }}" {{ with .Params.class }}class="{{ . }}"{{ end }} {{ if not $local }}target="_blank" rel="noopener"{{ end }}>
{{ $isRemote := not (or (.Page) (strings.HasPrefix .URL "/")) }}
<a href="{{ .URL }}" {{ with .Params.class }}class="{{ . }}"{{ end }} {{ if $isRemote }}target="_blank" rel="noopener"{{ end }}>
{{- .Pre -}}
{{ with .Page }}
{{ partial "docs/title" .Page }}