In DocFX configuration (e.g., docfx.json), is it possible to override this max directory depth setting that appears to default to five (5)?
While running a DocFX build, I'm getting a couple output lines complaining about some web font assets being too deep in the directory structure.
The following directories exceed max allowed depth 5, ignored: dist/assets/fonts/web/courier,dist/assets/fonts/web/futura,dist/assets/fonts/web/futuracon,dist/assets/fonts/web/mrseaves,dist/assets/fonts/web/wavehaus.
Investigation
In searching the DocFX code, I found this message in the LocalFileResourceReader.cs file's GetFiles
method. And it appears that this aligns with the 5
depth in the message with a const int MaxSearchLevel = 5
at the top of the file. In the constructor for that class, there is an optional maxSearchLevel
parameter that defaults to that const if the argument isn't provided.
public LocalFileResourceReader(string directory, int maxSearchLevel = MaxSearchLevel)
{ ... }
I haven't cloned the repo to properly track references, but GitHub's own symbol tracking suggests the only place that LocalFileResourceReader
constructor is called is in TemplateManager.cs where it is called with a single parameter. This seems to imply that overriding the maximum search level isn't allowed, but I'm hoping that's not the case.
private CompositeResourceReader CreateTemplateResource(IEnumerable<string> resources)
{
return new(GetTemplateDirectories(resources).Select(path => new LocalFileResourceReader(path)));
}
Additionally, searching the DocFX JSON reference doesn't seem to offer any mention of the word "depth".