Skip to content

Commit 22122b8

Browse files
hub: display base url in api path
Signed-off-by: Craig <[email protected]>
1 parent 983d541 commit 22122b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

layouts/_default/api-baseof.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@
5050

5151
<body>
5252
{{ $specURL := urls.Parse (printf "/%s%s.yaml" .File.Dir .File.ContentBaseName) }}
53-
<redoc spec-url="{{ $specURL.String }}" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
53+
{{ if strings.HasPrefix .RelPermalink "/reference/api/hub/" }}
54+
<redoc spec-url="{{ $specURL.String }}" suppress-warnings="true" lazy-rendering></redoc>
55+
{{ else }}
56+
<redoc spec-url="{{ $specURL.String }}" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
57+
{{ end }}
5458
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
5559
</body>
5660

0 commit comments

Comments
 (0)