Skip to content

Commit ac68e44

Browse files
hub: add base url to api paths (#22870)
<!--Delete sections as needed --> ## Description Display the base url specifically for Hub API and Registry API docs. Is this enough, or do we also need to write something about it in the description at the top? ![image](https://github.com/user-attachments/assets/666a4605-c131-4593-8a67-132481785a3e) ## Related issues or tickets ENGDOCS-2748 ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Editorial review --------- Signed-off-by: Craig <[email protected]>
1 parent a406224 commit ac68e44

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 or (strings.HasPrefix .RelPermalink "/reference/api/hub/") (strings.HasPrefix .RelPermalink "/reference/api/registry/") }}
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)