fix(api): refine .IsSection check to prevent breaking endpoint pages

The previous commit added an .IsSection check that correctly fixed
section index pages but inadvertently broke endpoint pages that Hugo
classifies as sections.

This commit refines the conditional to check for the absence of the
staticFilePath parameter, which distinguishes true section index pages
from endpoint pages that need the RapiDoc renderer:

- Section pages (no staticFilePath): Show children listing
- Endpoint pages (with staticFilePath): Use RapiDoc renderer

Fixes the regression introduced in commit 59daf17.
claude/fix-docs-build-issue-VL3Et
Claude 2026-01-01 00:26:13 +00:00
parent dddc246830
commit fd0bb98155
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -10,8 +10,8 @@
(api/section.html, api/list.html, api/single.html) should be preferred.
*/}}
{{/* Section pages should render content directly, not use RapiDoc */}}
{{ if .IsSection }}
{{/* Section pages without staticFilePath should render content directly, not use RapiDoc */}}
{{ if and .IsSection (not .Params.staticFilePath) }}
{{ partial "header.html" . }}
{{ partial "topnav.html" . }}
@ -54,7 +54,7 @@
{{ partial "footer.html" . }}
{{ else }}
{{/* Non-section pages with staticFilePath use RapiDoc renderer */}}
{{/* Pages with staticFilePath (operation pages) use RapiDoc renderer */}}
{{ partial "header.html" . }}
{{ partial "topnav.html" . }}