diff --git a/docs/content.fsx b/docs/content.fsx index 37e5ff6f0..7730c77ed 100644 --- a/docs/content.fsx +++ b/docs/content.fsx @@ -66,7 +66,7 @@ copy of this content in your `content` directory. ## Ignored Content -Any file or directory beginning with `.` is ignored. +Any file or directory beginning with `.` is ignored. Also `node_modules` directory is ignored. ## Front matter diff --git a/src/fsdocs-tool/BuildCommand.fs b/src/fsdocs-tool/BuildCommand.fs index 2cd1b096b..745765c16 100644 --- a/src/fsdocs-tool/BuildCommand.fs +++ b/src/fsdocs-tool/BuildCommand.fs @@ -94,6 +94,9 @@ type internal DocContent |> Array.filter (fun x -> x.Length = 2) |> Array.distinct + let sourceFileOrFolderIsSkipped (input: string) = + input.StartsWith "." || input = "node_modules" + let makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap: Map<(string * OutputKind), string>, outputKind) (markdownReference: string) @@ -155,7 +158,7 @@ type internal DocContent for subInputFolderFullPath in Directory.EnumerateDirectories(inputFolderAsGiven) do let subInputFolderName = Path.GetFileName(subInputFolderFullPath) - let subFolderIsSkipped = subInputFolderName.StartsWith "." + let subFolderIsSkipped = sourceFileOrFolderIsSkipped subInputFolderName let subFolderIsOutput = subFolderIsOutput subInputFolderFullPath if not subFolderIsOutput && not subFolderIsSkipped then @@ -485,7 +488,7 @@ type internal DocContent for subInputFolderFullPath in Directory.EnumerateDirectories(inputFolderAsGiven) do let subInputFolderName = Path.GetFileName(subInputFolderFullPath) - let subFolderIsSkipped = subInputFolderName.StartsWith "." + let subFolderIsSkipped = sourceFileOrFolderIsSkipped subInputFolderName let subFolderIsOutput = subFolderIsOutput subInputFolderFullPath if subFolderIsOutput || subFolderIsSkipped then