@@ -687,8 +687,12 @@ type internal DocContent
687
687
| _ -> () |]
688
688
689
689
member _.GetNavigationEntries
690
- ( input , docModels : ( string * bool * LiterateDocModel ) list , currentPagePath : string option )
691
- =
690
+ (
691
+ input ,
692
+ docModels : ( string * bool * LiterateDocModel ) list ,
693
+ currentPagePath : string option ,
694
+ ignoreUncategorized : bool
695
+ ) =
692
696
let modelsForList =
693
697
[ for thing in docModels do
694
698
match thing with
@@ -704,8 +708,15 @@ type internal DocContent
704
708
| Some currentPagePath -> currentPagePath = inputFileFullPath }
705
709
| _ -> () ]
706
710
711
+ let excludeUncategorized =
712
+ if ignoreUncategorized then
713
+ List.filter ( fun ( model : LiterateDocModel ) -> model.Category.IsSome)
714
+ else
715
+ id
716
+
707
717
let modelsByCategory =
708
718
modelsForList
719
+ |> excludeUncategorized
709
720
|> List.groupBy ( fun ( model ) -> model.Category)
710
721
|> List.sortBy ( fun ( _ , ms ) ->
711
722
match ms.[ 0 ]. CategoryIndex with
@@ -1296,6 +1307,12 @@ type CoreBuildOptions(watch) =
1296
1307
[<Option( " noapidocs" , Default = false , Required = false , HelpText = " Disable generation of API docs." ) >]
1297
1308
member val noapidocs = false with get, set
1298
1309
1310
+ [<Option( " ignoreuncategorized" ,
1311
+ Default = false ,
1312
+ Required = false ,
1313
+ HelpText = " Disable generation of 'Other' category for uncategorized docs." ) >]
1314
+ member val ignoreuncategorized = false with get, set
1315
+
1299
1316
[<Option( " ignoreprojects" , Default = false , Required = false , HelpText = " Disable project cracking." ) >]
1300
1317
member val ignoreprojects = false with get, set
1301
1318
@@ -1797,7 +1814,14 @@ type CoreBuildOptions(watch) =
1797
1814
let docModels = docContent.Convert( this.input, defaultTemplate, extraInputs)
1798
1815
let actualDocModels = docModels |> List.map fst |> List.choose id
1799
1816
let extrasForSearchIndex = docContent.GetSearchIndexEntries( actualDocModels)
1800
- let navEntriesWithoutActivePage = docContent.GetNavigationEntries( this.input, actualDocModels, None)
1817
+
1818
+ let navEntriesWithoutActivePage =
1819
+ docContent.GetNavigationEntries(
1820
+ this.input,
1821
+ actualDocModels,
1822
+ None,
1823
+ ignoreUncategorized = this.ignoreuncategorized
1824
+ )
1801
1825
1802
1826
let headTemplateContent =
1803
1827
let headTemplatePath = Path.Combine( this.input, " _head.html" )
@@ -1847,7 +1871,8 @@ type CoreBuildOptions(watch) =
1847
1871
docContent.GetNavigationEntries(
1848
1872
this.input,
1849
1873
actualDocModels,
1850
- Some currentPagePath
1874
+ Some currentPagePath,
1875
+ ignoreUncategorized = this.ignoreuncategorized
1851
1876
)
1852
1877
1853
1878
globals
0 commit comments