Skip to content

Commit

Permalink
Use custom NavigationContext for search to ensure search works regard…
Browse files Browse the repository at this point in the history
…less of PathSpecification
  • Loading branch information
GeertvanHorrik committed Aug 20, 2017
1 parent b07c2a0 commit 7399d4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DocNet/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ private void GenerateSearchPage(NavigationContext navigationContext)
searchSimpleElement.ExtraScriptProducerFunc = (e,c,n) => @"
<script>var base_url = '.';</script>
<script data-main=""js/search.js"" src=""js/require.js""></script>";
searchSimpleElement.GenerateOutput(this, activePath, navigationContext);

// Force custom navigation context because this should end up in the root
searchSimpleElement.GenerateOutput(this, activePath, new NavigationContext(PathSpecification.Full, UrlFormatting.None, 0, false));

activePath.Pop();
}

Expand Down

0 comments on commit 7399d4b

Please sign in to comment.