Browse Source

Use custom NavigationContext for search to ensure search works regardless of PathSpecification

pull/78/head
Geert van Horrik 7 years ago
parent
commit
7399d4bffc
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/DocNet/Config.cs

+ 4
- 1
src/DocNet/Config.cs View File

@@ -180,7 +180,10 @@ namespace Docnet
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();
}



Loading…
Cancel
Save