Docnet.Config.GenerateSearchData C# (CSharp) Method

GenerateSearchData() private method

Generates the search data, which is the json file called 'search_index.json' with search data of all pages as well as the docnet_search.htm file in the output. The search index is written to the root of the output folder.
private GenerateSearchData ( ) : void
return void
        internal void GenerateSearchData()
        {
            GenerateSearchPage();
            GenerateSearchDataIndex();
        }

Usage Example

Beispiel #1
0
 /// <summary>
 /// Generates the pages from the md files in the source, using the page template loaded and the loaded config.
 /// </summary>
 /// <returns>true if everything went ok, false otherwise</returns>
 private void GeneratePages()
 {
     if (_input.ClearDestinationFolder)
     {
         Console.WriteLine("Clearing destination folder '{0}'", _loadedConfig.Destination);
         _loadedConfig.ClearDestinationFolder();
     }
     Console.WriteLine("Copying theme '{0}'", _loadedConfig.ThemeName);
     _loadedConfig.CopyThemeToDestination();
     Console.WriteLine("Copying source folders to copy.");
     _loadedConfig.CopySourceFoldersToCopy();
     Console.WriteLine("Generating pages in '{0}'", _loadedConfig.Destination);
     _loadedConfig.Pages.GenerateOutput(_loadedConfig, new NavigatedPath());
     Console.WriteLine("Generating search index");
     _loadedConfig.GenerateSearchData();
     Console.WriteLine("Done!");
 }