diff --git a/content/en/api-docs.md b/content/en/api-docs.md new file mode 100644 index 000000000000..89dbc7a468bd --- /dev/null +++ b/content/en/api-docs.md @@ -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 %}} diff --git a/layouts/shortcodes/apidocs.md b/layouts/shortcodes/apidocs.md new file mode 100644 index 000000000000..b449b66110cd --- /dev/null +++ b/layouts/shortcodes/apidocs.md @@ -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 -}} \ No newline at end of file