Add dropdown menu option for landing page

This commit is contained in:
Alex Shpak
2025-09-04 00:17:38 +02:00
parent 564c0b07ad
commit dbaaa516e8
5 changed files with 48 additions and 14 deletions
+2 -1
View File
@@ -10,7 +10,8 @@
<ul>
{{ range . }}
<li>
<a href="{{ .URL }}" {{ with .Params.class }}class="{{ . }}"{{ end }} {{ if not .Page }}target="_blank" rel="noopener"{{ end }}>
{{ $local := or (.Page) (strings.HasPrefix .URL "/") }}
<a href="{{ .URL }}" {{ with .Params.class }}class="{{ . }}"{{ end }} {{ if not $local }}target="_blank" rel="noopener"{{ end }}>
{{- .Pre -}}
{{ with .Page }}
{{ partial "docs/title" .Page }}