Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /api-docs to make them easier to find #5190

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }} — {{ .page.Title }}]({{ .page.Permalink }})
{{ end -}}