File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1- @foreach( IDocument  doc  in  OutputPages .GetChildrenOf (" index.html" 
2-     .Where (x  =>  x .GetBool (SiteKeys .ShowInNavigation , true ))
3-     .OrderBy (x  =>  x .GetInt (Keys .Order ))) 
4- { 
5-     //  Don't add the home page to the nav bar 
6- if  (doc .Destination  !=  " index.html" 
1+ @{ 
2+     String  indexFileName  =  Context .Settings .GetIndexFileName ();
3+     foreach (IDocument  doc  in  OutputPages .GetChildrenOf (indexFileName )
4+         //  Ensure the API path is added even if it's not a direct child of the root page 
5+ Concat (OutputPages .Get (NormalizedPath .Combine (Context .GetPath (DocsKeys .ApiPath ), indexFileName )))
6+         .Where (x  =>  x .GetBool (SiteKeys .ShowInNavigation , true ))
7+         //  Ensure that duplicate API links aren't shown  
8+ Distinct ()
9+         .OrderBy (x  =>  x .GetInt (Keys .Order )))
710    { 
811        <li  class =" nav-item" 
912            @Html.DocumentLink( 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments