< Back

Write-PodeMarkdownResponse

Sat Jan 18, 2020 7:22 pm

NAME Write-PodeMarkdownResponse



SYNOPSIS

Writes Markdown data to the Response.





SYNTAX

Write-PodeMarkdownResponse -Value <Object> [-StatusCode <Int32>] [-AsHtml] [<CommonParameters>]



Write-PodeMarkdownResponse -Path <String> [-StatusCode <Int32>] [-AsHtml] [<CommonParameters>]





DESCRIPTION

Writes Markdown data to the Response, with the option to render it as HTML.





PARAMETERS

-Value <Object>

A String, PSObject, or HashTable value.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

The path to a Markdown file.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-StatusCode <Int32>

The status code to set against the response.



Required? false

Position? named

Default value 200

Accept pipeline input? false

Accept wildcard characters? false



-AsHtml [<SwitchParameter>]

If supplied, the Markdown will be converted to HTML. (This is only supported in PS7+)



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<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



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Write-PodeMarkdownResponse -Value '# Hello, world!' -AsHtml













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Write-PodeMarkdownResponse -Path 'E:/Site/About.md'















RELATED LINKS