Get-MarkdownHelp

1.1.8

The [Get-MarkdownHelp][1] cmdlet retrieves the [comment-based help][2] and converts it to a Markdown page
similar to the general online PowerShell help pages (as e.g. [Get-Content]).\
Note that this cmdlet *doesn't* support `XML`-based help files, but has a few extra features for the comment-based
help as opposed to the native [platyPS][3] [New-MarkdownHelp]:

* **Cod
The [Get-MarkdownHelp][1] cmdlet retrieves the [comment-based help][2] and converts it to a Markdown page
similar to the general online PowerShell help pages (as e.g. [Get-Content]).\
Note that this cmdlet *doesn't* support `XML`-based help files, but has a few extra features for the comment-based
help as opposed to the native [platyPS][3] [New-MarkdownHelp]:

* **Code Blocks**

To create code blocks, indent every line of the block by at least four spaces or one tab relative the **text indent**.
The **text indent** is defined by the smallest indent of the current - and the `.SYNOPSIS` section.\
Code blocks are automatically [fenced][4] for default PowerShell color coding.\
The usual comment-based help prefix for code (`PS. \>`) might also be used to define a code lines.
For more details, see the [-PSCodePattern parameter].

As defined by the standard help interpreter, code blocks (including fenced code blocks) can't include help keywords.
Meaning (fenced) code blocks will end at the next section defined by `.<help keyword>`.

* **Titled Examples**

Examples can be titled by adding an (extra) hash (`#`) in front of the first line in the section.
This line will be removed from the section and added to the header of the example.

* **Links**

> As Per markdown definition, The first part of a [reference-style link][5] is formatted with two sets of brackets.
> The first set of brackets surrounds the text that should appear linked. The second set of brackets displays
> a label used to point to the link you're storing elsewhere in your document, e.g.: `[rabbit-hole][1]`.
> The second part of a reference-style link is formatted with the following attributes:

> * The label, in brackets, followed immediately by a colon and at least one space (e.g., `[label]:` ).
> * The URL for the link, which you can optionally enclose in angle brackets.
> * The optional title for the link, which you can enclose in double quotes, single quotes, or parentheses.

For the comment-base help implementation, the second part should be placed in the `.LINK` section to automatically
listed in the end of the document. The reference will be hidden if the label is an explicit empty string(`""`).

* **Quick Links**

Any phrase existing of a combination alphanumeric characters, spaces, underscores and dashes between squared brackets
(e.g. `[my link]`) will be linked to the (automatic) anchor id in the document, e.g.: `[my link](#my-link)`.

> **Note:** There is no confirmation if the internal anchor really exists.

* **Parameter Links**

**Parameter links** are similar to **Quick Links** but start with a dash and contain an existing parameter name possibly
followed by the word "parameter". E.g.: `[-AlternateEOL]` or `[-AlternateEOL parameter]`.
In this example, the parameter link will refer to the internal [-AlternateEOL parameter].

* **Cmdlet Links**

**Cmdlet links** are similar to **Quick Links** but contain a cmdlet name where the online help is known. E.g.: `[Get-Content]`.
In this example, the cmdlet link will refer to the online help of the related [Get-Content] cmdlet.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Get-MarkdownHelp

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Package Details

Author(s)

  • iRon

Tags

Help MarkDown ReadMe

Functions

Sentence Indent StopError GetHelpItems GetHelp SplitInLineCode QuickLinks GetMarkDown GetTypeLink

Dependencies

This script has no dependencies.

FileList

Version History

Version Downloads Last updated
1.1.8 (current version) 712 5/4/2024
1.1.7 11 3/9/2024
1.1.6 9 2/28/2024
1.1.5 11 1/17/2024
1.1.4 11 12/6/2023
1.1.2 21 7/30/2023
1.0.8 22 2/12/2023
0.9.3 26 8/15/2022
Show more