MarkdownSourceOverlapDetector Pennington.Content
Detects overlapping markdown content sources — pairs where one source's AbsoluteContentRoot is a strict descendant directory of another's, AND the outer source does not opt out of that subtree via ExcludePaths. Overlap without an explicit carve-out is almost always a misconfiguration: the outer (catch-all) source and the inner (specialized) source both emit routes for the same canonical URLs, producing duplicate TOC entries in every page's sidebar and file-lock races when two pipelines write the same output file. The engine emits warnings rather than silently deduping so users can see and fix the misconfig.
Methods
DetectOverlaps
#public static ImmutableArray<string> DetectOverlaps(
IEnumerable<IMarkdownContentSource> sources);Returns one warning per unresolved overlap. Empty when everything is either disjoint or explicitly carved out.
Parameters
sourcesIEnumerable<IMarkdownContentSource>
Returns
ImmutableArray<string>Pennington.Content.MarkdownSourceOverlapDetector
namespace Pennington.Content;
/// Detects overlapping markdown content sources — pairs where one source's AbsoluteContentRoot is a strict descendant directory of another's, AND the outer source does not opt out of that subtree via ExcludePaths. Overlap without an explicit carve-out is almost always a misconfiguration: the outer (catch-all) source and the inner (specialized) source both emit routes for the same canonical URLs, producing duplicate TOC entries in every page's sidebar and file-lock races when two pipelines write the same output file. The engine emits warnings rather than silently deduping so users can see and fix the misconfig.
public class MarkdownSourceOverlapDetector
{
/// Returns one warning per unresolved overlap. Empty when everything is either disjoint or explicitly carved out.
public static ImmutableArray<string> DetectOverlaps(
IEnumerable<IMarkdownContentSource> sources);
}