Menu: Allow to explicitly override if a menu url is remote or not (#809)
* Menu: Allow to explicitly override if a menu url is remote or not This can be very useful if a hugo website f.e. on GitHub pages is constructed from different individual spec repos but still represent one coherent site. * Rename param to bookNewTab --------- Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
{{- $class = $class | append "active" -}}
|
||||
{{- end -}}
|
||||
<li>
|
||||
{{- $isRemote := (urls.Parse .URL).IsAbs -}}
|
||||
{{- $isRemote := default (urls.Parse .URL).IsAbs .Params.bookNewTab -}}
|
||||
<a href="{{ .URL }}"
|
||||
{{- with $class }} class="{{ delimit . " " }}"{{- end -}}
|
||||
{{- with .Title }} title="{{ . }}"{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user