Doraku / DefaultDocumentation

Create a simple markdown documentation from the Visual Studio xml one.
MIT No Attribution
157 stars 26 forks source link

Feature request: Create a folder for each namespace #149

Closed adlerzei closed 4 months ago

adlerzei commented 1 year ago

Instead of placing all files in a single folder, it would be nice if I could get DefaultDocumentation to generate individual folders for each Namespace level. For example, if I would set the AssemblyPageName to "_index" and GeneratedPages to "Namespaces,Classes", the following code

namespace This.Is.A.Namespace
{
    class Class1 {}
    class Class2 {}
}

namespace This.Is.A.Namespace.Specific
{
    class Class1 {}
    class Class2 {}
}

namespace This.Is.Another.Namespace
{
    class Class1 {}
    class Class2 {}
}

results in the files

all in the same output folder.

I would wish to get something like

.
├── _index.md
├── This.Is.A.Namespace/
│   ├── _index.md
│   ├── This.Is.A.Namespace.Class1.md
│   ├── This.Is.A.Namespace.Class2.md
│   └── This.Is.A.Namespace.Specific/
│       ├── _index.md
│       ├── This.Is.A.Namespace.Specific.Class1.md
│       └── This.Is.A.Namespace.Specific.Class1.md
└── This.Is.Another.Namespace/
    ├── _index.md
    ├── This.Is.Another.Namespace.Class1.md
    └── This.Is.Another.Namespace.Class2.md

or anything related. Would that be possible?

I know that I can move (and rename) the files myself but then the cross-references in the generated Markdown produced by DefaultDocumentation would break I guess.

adlerzei commented 4 months ago

I guess I can solve this using a custom plugin.