From fd0bb98155c63ca229529c821355b27f3f1d4abd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 1 Jan 2026 00:26:13 +0000 Subject: [PATCH] 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. --- layouts/_default/api.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/_default/api.html b/layouts/_default/api.html index 4d89857bd..a1ec5dab3 100644 --- a/layouts/_default/api.html +++ b/layouts/_default/api.html @@ -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" . }}