Skip to content

Commit

Permalink
Fix failure to render ChildPages when ApiPath has more than one segme…
Browse files Browse the repository at this point in the history
…nt (e.g. test/api)
  • Loading branch information
ociaw authored and daveaglick committed Dec 29, 2022
1 parent ff6d777 commit fe480ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion input/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
}
@await Html.PartialAsync("_Splash")
@{
string section = Document.Destination.Segments.Length > 1 ? Document.Destination.Segments[0].ToString() : null;
string section = Document.Destination.Segments.Length > 1 ? @Context.GetString(DocsKeys.ApiPath) : null;
IDocument root = OutputPages.Get(section + "/index.html");
}
<div class="flex-grow-1 d-flex flex-column">
Expand Down Expand Up @@ -166,6 +166,10 @@
{
IgnoreSection(SectionNames.Sidebar);
}
if (IsSectionDefined(SectionNames.ChildPages))
{
IgnoreSection(SectionNames.ChildPages);
}

<div id="content" class="offset-lg-2 col-12 col-lg-8 p-4 pt-md-0 bg-white">
@* Render the body without indenting in case it contains things like directives *@
Expand Down

0 comments on commit fe480ef

Please sign in to comment.