diff --git a/input/Shared/_RightNavigation.cshtml b/input/Shared/_RightNavigation.cshtml index aed3140..1ee9ddf 100644 --- a/input/Shared/_RightNavigation.cshtml +++ b/input/Shared/_RightNavigation.cshtml @@ -1,9 +1,12 @@ -@foreach(IDocument doc in OutputPages.GetChildrenOf("index.html") - .Where(x => x.GetBool(SiteKeys.ShowInNavigation, true)) - .OrderBy(x => x.GetInt(Keys.Order))) -{ - // Don't add the home page to the nav bar - if (doc.Destination != "index.html") +@{ + String indexFileName = Context.Settings.GetIndexFileName(); + foreach(IDocument doc in OutputPages.GetChildrenOf(indexFileName) + // Ensure the API path is added even if it's not a direct child of the root page + .Concat(OutputPages.Get(NormalizedPath.Combine(Context.GetPath(DocsKeys.ApiPath), indexFileName))) + .Where(x => x.GetBool(SiteKeys.ShowInNavigation, true)) + // Ensure that duplicate API links aren't shown + .Distinct() + .OrderBy(x => x.GetInt(Keys.Order))) {