예제 #1
0
        private static void WriteModulePage(PsModuleHelpInfo moduleInfo, MarkdownHelpInfo[] markdownInfos, string docsFolder)
        {
            var sb = new StringBuilder();

            sb.Append(moduleInfo.ToModulePageMetadataOutput());
            sb.Append($"# {moduleInfo.Name} Module{Environment.NewLine}");
            sb.Append($"## Description{Environment.NewLine}{moduleInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}");

            sb.Append($"## {moduleInfo.Name} Cmdlets{Environment.NewLine}");
            foreach (var markdownInfo in markdownInfos)
            {
                sb.Append(markdownInfo.ToModulePageCmdletOutput());
            }

            File.WriteAllText(Path.Combine(docsFolder, $"{moduleInfo.Name}.md"), sb.ToString());
        }