Open svrooij opened 7 months ago
@sdwheeler are you accepting a PR for this? And can you help me get started? I have no clue where to look.
@svrooij We are not considering support for XML docs at this time. We may consider it in the future. This would require further investigation.
I see the code in src\Markdown.MAML is not published as a nuget, can I just use a submodule to take that code and use it to write the xml file myself?
No. That code is not supported and it is being replaced by a complete rewrite. You shouldn't take any dependencies on that code.
With the new version of PlatyPS that is being developed, you will import the cmdlet markdown files into a PowerShell object. You can then change property values in the object to update the documentation. So you could read documentation from the XMLdoc and inject it into the object. Then you write that object out as Markdown, Yaml, or MAML.
Summary of the new feature / enhancement
As a developer of a binary powershell module I would like to document in inside the C# files, as I'm used to for creating C# libraries.
Proposed technical implementation details (optional)
I suggest supporting XML docs above the
PsCmdLet
as follows:And I wrote a powershell script that parses the generated C# xml documentation file and updates the markdown files accordingly. This powershell replaces the placeholders with data from the xml docs. If the data is already updated nothing will happen. Off-course it would be better to integrate this right into the normal c# code that does the markdown generation. Something like
-GenerateUsingXmlDocs <docsLocation>
.New-MarkdownHelp ...
first, to create the docs files.None
andCopy Always
in the properties in Visual Studio.