Skip to content

Commit da1b818

Browse files
authored
Merge pull request #2 from t-lo/t-lo/update-kernel-repo-prevent-new-tab
Update to kernel-features repo, prevent open in new tab
2 parents 380609e + 48544a7 commit da1b818

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

config.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ theme = "hugo-book"
1212
url = "https://uapi-group.org/specifications"
1313
weight = 11
1414
[[menu.after]]
15-
name = "Kernel Features"
16-
url = "https://uapi-group.org/kernel"
15+
name = "Kernel Feature Ideas"
16+
url = "https://uapi-group.org/kernel-features"
1717
weight = 12
1818
[[menu.after]]
1919
name = "-"

layouts/partials/docs/menu-hugo.html

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!--
2+
This is template for hugo menus, accepts MenuEntity as context
3+
https://gohugo.io/variables/menus/
4+
-->
5+
{{ if . }}
6+
{{ template "book-menu-hugo" . }}
7+
{{ end }}
8+
9+
{{ define "book-menu-hugo" }}
10+
<ul>
11+
{{ range . }}
12+
<li>
13+
{{ if not (eq .Name "-") }}
14+
<a href="{{ .URL }}" {{ if not (hasPrefix .URL "https://uapi-group.org/") }} {{ if not .Page }}target="_blank" rel="noopener"{{ end }} {{ end }}>
15+
{{ end }}
16+
{{- .Pre -}}
17+
{{ with .Page }}
18+
{{ partial "docs/title" .Page }}
19+
{{ else }}
20+
{{ .Name }}
21+
{{ end }}
22+
{{- .Post -}}
23+
{{ if not (eq .Name "-") }}
24+
</a>
25+
{{ end }}
26+
{{- with .Children }}
27+
{{ template "book-menu-hugo" . }}
28+
{{- end }}
29+
</li>
30+
{{ end }}
31+
</ul>
32+
{{ end }}

0 commit comments

Comments
 (0)