diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 4c13f0b8..4e11e755 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,5 +1,10 @@
# Changelog
+## 21.0.0-beta-005 - 2025-04-23
+
+### Added
+* Add --ignoreuncategorized flag. [#953](https://github.com/fsprojects/FSharp.Formatting/pull/953)
+
## 21.0.0-beta-004 - 2024-11-20
### Changed
diff --git a/docs/commandline.md b/docs/commandline.md
index 3f460cb9..0abff1ae 100644
--- a/docs/commandline.md
+++ b/docs/commandline.md
@@ -26,6 +26,7 @@ The command line options accepted are:
| `--input` | Input directory of content (default: `docs`) |
| `--projects` | Project files to build API docs for outputs, defaults to all packable projects |
| `--output` | Output Directory (default 'output' for 'build' and 'tmp/watch' for 'watch') |
+| `--ignoreuncategorized` | Disable generation of the 'Other' category in the navigation bar for uncategorized docs |
| `--noapidocs` | Disable generation of API docs |
| `--ignoreprojects` | Disable project cracking |
| `--eval` | Evaluate F# fragments in scripts |
diff --git a/src/fsdocs-tool/BuildCommand.fs b/src/fsdocs-tool/BuildCommand.fs
index d10d24d1..457c0530 100644
--- a/src/fsdocs-tool/BuildCommand.fs
+++ b/src/fsdocs-tool/BuildCommand.fs
@@ -687,8 +687,12 @@ type internal DocContent
| _ -> () |]
member _.GetNavigationEntries
- (input, docModels: (string * bool * LiterateDocModel) list, currentPagePath: string option)
- =
+ (
+ input,
+ docModels: (string * bool * LiterateDocModel) list,
+ currentPagePath: string option,
+ ignoreUncategorized: bool
+ ) =
let modelsForList =
[ for thing in docModels do
match thing with
@@ -704,8 +708,15 @@ type internal DocContent
| Some currentPagePath -> currentPagePath = inputFileFullPath }
| _ -> () ]
+ let excludeUncategorized =
+ if ignoreUncategorized then
+ List.filter (fun (model: LiterateDocModel) -> model.Category.IsSome)
+ else
+ id
+
let modelsByCategory =
modelsForList
+ |> excludeUncategorized
|> List.groupBy (fun (model) -> model.Category)
|> List.sortBy (fun (_, ms) ->
match ms.[0].CategoryIndex with
@@ -1296,6 +1307,12 @@ type CoreBuildOptions(watch) =
[