-
Notifications
You must be signed in to change notification settings - Fork 1
New MarkdownTableOfContents
external help file: WhatsNew.dll-Help.xml
Module Name: WhatsNew
schema: 2.0.0
Creates a table of contents for a collection of markdown files, specifically for use with GitHub wiki pages.
New-MarkdownTableOfContents [-Path] <String> [-Filter] <String> [-BaseUrl] <String> [[-ListType] <String>]
[<CommonParameters>]
Use this command to create a markdown-formatted table of contents that corresponds to a collection of markdown files. This was specifically written in order to create a table of contents like you can see here on the WhatsNew wiki home page. The command assumes each markdown file can be reached online by a predictable URL format, as is the case with GitHub wiki pages.
PS C:\> New-MarkdownTableOfContents
-Path 'C:\Repos\whats-new.wiki'
-Filter "*-*.md"
-BaseUrl 'https://github.com/refactorsaurusrex/whats-new/wiki'
-ListType UnorderedCreates an unordered markdown list of all the files contained in C:\Repos\whats-new.wiki that match the pattern *-*.md, prepends the BaseUrl, and outputs the results. The results of this command can be seen on the WhatsNew wiki home page.
BONUS FEATURE: If you install ClipboardText, you can pipe the results of the above command to Set-ClipboardText and paste wherever you want!
Either the path to a specific file, or a directory containing a collection of files from which to create a table of contents.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe search string to match against the names of files in path. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe url which should be prepended to the file name to create valid URLs for each table of contents item.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecify whether to create an ordered or unordered list. The default is unordered.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: Unordered
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.