Convert-AboutTopicToHtml

Converts an about topic into HTML.

Syntax

Convert-AboutTopicToHtml [-InputObject] <Object> [[-TopicName] <String>] [-ModuleName] <String> [[-TopicHeading] <String>] [[-ShortDescriptionHeading] <String>] [[-LongDescriptionHeading] <String>] [[-SeeAlsoHeading] <String>] [[-HeadingMap] <Hashtable>] [[-Script] <String[]>] [<CommonParameters>]

Description

The Convert-AboutTopicToHtml converts a PowerShell about topic into HTML. The about topic is expected to be formatted like PowerShell's internal topics:

TOPIC
    about_<subject or module name>

SHORT DESCRIPTION
    A short, one-line description of the topic contents.

LONG DESCRIPTION
    A detailed, full description of the subject or purpose of the module.

EXAMPLES
    Examples of how to use the module or how the subject feature works in practice.

KEYWORDS
    Terms or titles on which you might expect your users to search for the information in this topic.

SEE ALSO
    Text-only references for further reading. Hyperlinks cannot work in the Windows PowerShell console. 

Convert-AboutTopicToHtml does the following:

Lines that don't begin with spaces are assumed to be headers.

Lines that begin with spaces are assumed to be content written in Markdown.

The SEE ALSO section is parsed, one line at a time for links, command names, and other help topics, e.g.

SEE ALSO
    https://msdn.microsoft.com/en-us/library/Dd878343.aspx
    about_Silk
    Convert-AboutTopicToHtml

Would convert into a three item list, the first a link to the web, the second a link to the about_Silk.html topic, and the third to the Convert-AboutTopicToHtml.html page.

Parameters

Name Type Description Required? Pipeline Input Default Value
InputObject Object

The name of the help topic, include the about_ prefix, or a FileInfo object representing the help topic, or the help topic as a giant string.

true true (ByValue)
TopicName String

The name of the topic you're converting. Only used if InputObject is the text of the about topic.

false false
ModuleName String

The name of the module being documented.

true false
TopicHeading String

The heading used for the topic's name. Default is TOPIC.

false false TOPIC
ShortDescriptionHeading String

The heading used for the topic's short description. Default is SHORT DESCRIPTION.

false false SHORT DESCRIPTION
LongDescriptionHeading String

The heading used for the topic's long description. Default is LONG DESCRIPTION.

false false LONG DESCRIPTION
SeeAlsoHeading String

The heading used for the topic's See Also section. Default is SEE ALSO.

false false SEE ALSO
HeadingMap Hashtable

A hashtable of headings to use. They key should be the section name. The value should be the heading name.

false false @{}
Script String[]

The names of any scripts in the module.

false false