Skip to content

Commit

Permalink
Add /api-docs to make them easier to find (#5190)
Browse files Browse the repository at this point in the history
Signed-off-by: svrnm <[email protected]>
  • Loading branch information
svrnm authored Sep 16, 2024
1 parent df604b8 commit d2204b1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions content/en/api-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: API Documentation
linkTitle: Docs
cSpell:ignore: apidocs
---

{{% blocks/section color="white" %}}

## {{% param title %}}

Below you will find links to all the API references available for the different
implementations of the OpenTelemetry API & SDK

{{% apidocs %}}

{{% /blocks/section %}}
19 changes: 19 additions & 0 deletions layouts/shortcodes/apidocs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ $pages := slice }}
{{ range $key,$value := $.Site.Data.instrumentation -}}
{{ if eq $key "dotnet" -}}
{{ with $.Site.GetPage "/docs/languages/net/traces-api" -}}
{{ $pages = $pages | append (dict "lang" $value "page" .) }}
{{ end }}
{{ with $.Site.GetPage "/docs/languages/net/metrics-api" -}}
{{ $pages = $pages | append (dict "lang" $value "page" .) }}
{{ end }}
{{ else -}}
{{ with $.Site.GetPage (printf "/docs/languages/%s/api" $key) -}}
{{ $pages = $pages | append (dict "lang" $value "page" .) }}
{{ end }}
{{ end -}}
{{ end -}}

{{ range $pages }}
* [{{ .lang.name }} &mdash; {{ .page.Title }}]({{ .page.Permalink }})
{{ end -}}

0 comments on commit d2204b1

Please sign in to comment.