Skip to content

Commit 840e4a0

Browse files
committed
Add link to Swagger docs to main menu
The HTTP API reference is not linked through the docs site so it's not clear to a newcomer to Sigstore that one actually exists. This change adds a link on the main menu out to the auto-generated Swagger site so that it is easily discoverable. Signed-off-by: Colleen Murphy <[email protected]>
1 parent 1110d77 commit 840e4a0

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

config/_default/menus/menus.en.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
identifier = "policy-controller"
2323
url = "https://github.com/sigstore/policy-controller/blob/main/docs/api-types/index.md"
2424

25+
[[swagger]]
26+
name = "OpenAPI Specification"
27+
weight = 50
28+
identifier = "swagger"
29+
url = "https://www.sigstore.dev/swagger/"
30+
2531
# [[main]]
2632
# name = "Docs"
2733
# url = "/docs/about/overview/"

layouts/partials/sidebar/auto-collapsible-menu.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515

1616
{{ $Sections := site.Sections | append $ExternalSiteSection }}
1717

18+
{{ $SwaggerDocsPages := slice }}
19+
{{- range site.Menus.swagger }}
20+
{{ $NewPage := dict "TargetBlank" true "Title" .Name "Permalink" .ConfiguredURL }}
21+
{{ $SwaggerDocsPages = $SwaggerDocsPages | append $NewPage }}
22+
{{ end }}
23+
{{ $SwaggerSection := dict "Title" "API Reference" "Pages" $SwaggerDocsPages }}
24+
25+
{{ $Sections = $Sections | append $SwaggerSection }}
26+
1827

1928
<!-- This changed from Doks default to reflect no "docs" section folder -->
2029
{{ range $Sections }}

0 commit comments

Comments
 (0)