From 5f0b7c0795a22eeb07cf6df6e84a3930c8babe8e Mon Sep 17 00:00:00 2001 From: svrnm Date: Fri, 13 Sep 2024 12:05:11 +0200 Subject: [PATCH 1/2] Add /api-docs to make them easier to find Signed-off-by: svrnm --- content/en/api-docs.md | 15 +++++++++++++++ layouts/shortcodes/apidocs.md | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 content/en/api-docs.md create mode 100644 layouts/shortcodes/apidocs.md diff --git a/content/en/api-docs.md b/content/en/api-docs.md new file mode 100644 index 000000000000..0c032a0b2a02 --- /dev/null +++ b/content/en/api-docs.md @@ -0,0 +1,15 @@ +--- +title: API Documentation +linkTitle: Docs +--- + +{{% 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 From 8f2ec10d7fcb2ca84ee70a44b1d966329301ce59 Mon Sep 17 00:00:00 2001 From: svrnm Date: Fri, 13 Sep 2024 12:21:45 +0200 Subject: [PATCH 2/2] add cspell ignore Signed-off-by: svrnm --- content/en/api-docs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/api-docs.md b/content/en/api-docs.md index 0c032a0b2a02..89dbc7a468bd 100644 --- a/content/en/api-docs.md +++ b/content/en/api-docs.md @@ -1,6 +1,7 @@ --- title: API Documentation linkTitle: Docs +cSpell:ignore: apidocs --- {{% blocks/section color="white" %}}