< Back

Merge-MarkdownHelp

Sat Jan 18, 2020 7:08 pm

NAME Merge-MarkdownHelp



SYNOPSIS

Merge multiple markdown versions of the same cmdlet into a single markdown file.





SYNTAX

Merge-MarkdownHelp [-Path] <String[]> [-OutputPath] <String> [[-MergeMarker] <String>] [-Encoding <Encoding>]

[-ExplicitApplicableIfAll] [-Force] [<CommonParameters>]





DESCRIPTION

Similar modules, or different versions of the same module, often contain duplicate content.



Merge-MarkdownHelp merges the multiple markdown files into a single markdown file. It uses the `applicable:` yaml

metadata field to identify what versions or tags are applicable. It acts on two levels: for the whole cmdlet and

for individual parameters.



The resulting markdown contains the `applicable:` tags as well as all of the content of the original markdown

files. Duplicate content is simply ignored. Content that is unique to each file is merged using merge markers ,

followed by a comma-separated list of applicable tags. A merge marker is a string of text that acts as a marker to

describe the content that was merged. The default merge marker text consists of three exclamation points !!!

however this can be changed to any relevant text using the -MergeMarker flag.





PARAMETERS

-Encoding <Encoding>

Specifies the character encoding for your external help file. Specify a System.Text.Encoding object. For more

information, see Character Encoding in the .NET Framework

(https://msdn.microsoft.com/en-us/library/ms404377.aspx)in the Microsoft Developer Network. For example, you

can control Byte Order Mark (BOM) preferences. For more information, see Using PowerShell to write a file in

UTF-8 without the BOM

(http://stackoverflow.com/questions/5596 ... ut-the-bom)at the

Stack Overflow community.



Required? false

Position? named

Default value UTF8 without BOM

Accept pipeline input? False

Accept wildcard characters? false



-ExplicitApplicableIfAll [<SwitchParameter>]

Always write out full list of applicable tags. By default cmdlets and parameters that are present in all

variations don't get an application tag.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Indicates that this cmdlet overwrites an existing file that has the same name.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-MergeMarker <String>

String to be used as a merge text indicator. Applicable tag list would be included after the marker



Required? false

Position? 3

Default value '!!! '

Accept pipeline input? False

Accept wildcard characters? false



-OutputPath <String>

Specifies the path of the folder where this cmdlet creates the combined markdown help files.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Path <String[]>

Specifies an array of paths of markdown files or folders. This cmdlet creates combined markdown help based on

these files and folders.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String[]







OUTPUTS

System.IO.FileInfo[]







NOTES









-------------------------- Example 1 --------------------------



PS C:\\> Merge-MarkdownHelp -Path @('Lync Server 2010\\Test-CsPhoneBootstrap.md', 'Lync Server

2013\\Test-CsPhoneBootstrap.md') -OutputPath lync



The resulting file will be located at lync\\Test-CsPhoneBootstrap.md



RELATED LINKS