diff --git a/.gitignore b/.gitignore index 868814232..7a973e311 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,10 @@ package-lock.json /content/influxdb3/*/reference/api/** /static/openapi +# Exception: hand-crafted API conceptual pages (not generated) +!/content/influxdb3/*/api/administration/ +!/content/influxdb3/*/api/administration/_index.md + /helper-scripts/output/* /telegraf-build !telegraf-build/templates diff --git a/content/influxdb3/core/api/administration/_index.md b/content/influxdb3/core/api/administration/_index.md new file mode 100644 index 000000000..ba791c152 --- /dev/null +++ b/content/influxdb3/core/api/administration/_index.md @@ -0,0 +1,26 @@ +--- +title: Administration +description: Endpoints for managing databases, tables, and tokens. +type: api +layout: list +weight: 105 +isConceptual: true +--- + +Use the Administration API to manage InfluxDB resources: + + diff --git a/content/influxdb3/enterprise/api/administration/_index.md b/content/influxdb3/enterprise/api/administration/_index.md new file mode 100644 index 000000000..833443bd4 --- /dev/null +++ b/content/influxdb3/enterprise/api/administration/_index.md @@ -0,0 +1,26 @@ +--- +title: Administration +description: Endpoints for managing databases, tables, and tokens. +type: api +layout: list +weight: 105 +isConceptual: true +--- + +Use the Administration API to manage InfluxDB resources: + + diff --git a/data/api_nav_groups.yml b/data/api_nav_groups.yml index 9598e548c..637284c7e 100644 --- a/data/api_nav_groups.yml +++ b/data/api_nav_groups.yml @@ -1,6 +1,12 @@ # API Navigation Groups # Defines sidebar navigation structure for API reference documentation # Tags are grouped by function/task for better UX +# +# Group fields: +# name: Display name in the navigation +# weight: Sort order (lower = higher) +# tags: List of tag names that belong to this group +# url: (optional) URL path suffix for the group page (relative to api/) groups: - name: Concepts @@ -27,6 +33,7 @@ groups: - name: Administration weight: 5 + url: administration tags: - Database - Table diff --git a/layouts/partials/sidebar/api-menu-items.html b/layouts/partials/sidebar/api-menu-items.html new file mode 100644 index 000000000..2850e2656 --- /dev/null +++ b/layouts/partials/sidebar/api-menu-items.html @@ -0,0 +1,216 @@ +{{/* + API Reference Menu Items for Hugo Navigation + + Generates + + {{ else }} + {{/* Multi-tag group: group label (or link if url defined) with tag pages as children */}} + {{ $groupUrl := "" }} + {{ $groupIsActive := false }} + {{ with $group.url }} + {{ $groupUrl = print "/" $product "/" $version "/api/" . "/" | relURL }} + {{ $groupIsActive = eq $currentPage.RelPermalink (print "/" $product "/" $version "/api/" . "/") }} + {{ end }} + + {{ end }} + {{ end }} + {{ end }} +{{ end }} diff --git a/layouts/partials/sidebar/nested-menu.html b/layouts/partials/sidebar/nested-menu.html index 67cf9a1e0..12dd9eec1 100644 --- a/layouts/partials/sidebar/nested-menu.html +++ b/layouts/partials/sidebar/nested-menu.html @@ -1,22 +1,39 @@ {{ $page := .page }} {{ $menu := .menu }} +{{ $siteData := .siteData }} {{ define "recursiveMenu" }} {{ $menuContext := .menu }} {{ $currentPage := .currentPage }} + {{ $site := .site }} + {{ $siteData := .siteData }} {{ $depth := add .depth 1 }} {{ $navClass := cond (gt $depth 1) "item" "category" }} {{ range $menuContext }} + {{/* Check if this is the InfluxDB HTTP API menu item for InfluxDB 3 products */}} + {{ $isApiParent := and (eq .Name "InfluxDB HTTP API") (or (hasPrefix .URL "/influxdb3/") (hasPrefix .URL "/influxdb/")) }} +