diff --git a/config/_default/menus/menus.en.toml b/config/_default/menus/menus.en.toml index abac4c3a..dab1b2d0 100644 --- a/config/_default/menus/menus.en.toml +++ b/config/_default/menus/menus.en.toml @@ -22,6 +22,12 @@ identifier = "policy-controller" url = "https://github.com/sigstore/policy-controller/blob/main/docs/api-types/index.md" +[[swagger]] + name = "OpenAPI Specification" + weight = 50 + identifier = "swagger" + url = "https://www.sigstore.dev/swagger/" + # [[main]] # name = "Docs" # url = "/docs/about/overview/" diff --git a/layouts/partials/sidebar/auto-collapsible-menu.html b/layouts/partials/sidebar/auto-collapsible-menu.html index 65b6670c..d15a0894 100644 --- a/layouts/partials/sidebar/auto-collapsible-menu.html +++ b/layouts/partials/sidebar/auto-collapsible-menu.html @@ -15,6 +15,15 @@ {{ $Sections := site.Sections | append $ExternalSiteSection }} + {{ $SwaggerDocsPages := slice }} + {{- range site.Menus.swagger }} + {{ $NewPage := dict "TargetBlank" true "Title" .Name "Permalink" .ConfiguredURL }} + {{ $SwaggerDocsPages = $SwaggerDocsPages | append $NewPage }} + {{ end }} + {{ $SwaggerSection := dict "Title" "API Reference" "Pages" $SwaggerDocsPages }} + + {{ $Sections = $Sections | append $SwaggerSection }} + {{ range $Sections }}