OfficeIMO

API Reference

Command

ConvertTo-OfficeMarkdownHtml

Namespace PSWriteOffice
Inputs
OfficeIMO.Markdown.MarkdownDoc
Outputs
System.String System.IO.FileInfo

Converts Markdown content to HTML.

Remarks

Converts Markdown content to HTML.

Examples

Convert a Markdown file to HTML.


PS>$html = ConvertTo-OfficeMarkdownHtml -Path .\README.md
        

Returns the rendered HTML.

Save a styled HTML document.


PS>ConvertTo-OfficeMarkdownHtml -Path .\Report.md -DocumentMode -Title 'Weekly Report' -Style Clean -OutputPath .\Report.html -PassThru
        

Generates a full HTML file with title and CSS styling.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

ConvertTo-OfficeMarkdownHtml [-AssetMode <Online|Offline>] [-CssDelivery <Inline|ExternalFile|LinkHref>] [-DocumentMode] -InputPath <String> [-OutputPath <String>] [-PassThru] [-Profile <Nullable`1>] [-ReaderOptions <MarkdownReaderOptions>] [-Style <Plain>] [-Title <String>] [<CommonParameters>]
#
Parameter set: Path

Parameters

AssetMode AssetMode optionalposition: namedpipeline: Falsevalues: 2
Asset loading mode.
Possible values: Online, Offline
CssDelivery CssDelivery optionalposition: namedpipeline: Falsevalues: 3
CSS delivery mode.
Possible values: Inline, ExternalFile, LinkHref
DocumentMode SwitchParameter optionalposition: namedpipeline: False
Render a full HTML document instead of a fragment.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the Markdown file.
OutputPath String optionalposition: namedpipeline: Falsealiases: OutPath
Optional output path for the HTML file.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit a FileInfo when saving to disk.
Profile Nullable`1 optionalposition: namedpipeline: False
Named reader profile used when ReaderOptions is not supplied.
ReaderOptions MarkdownReaderOptions optionalposition: namedpipeline: False
Optional reader options when parsing Markdown.
Style HtmlStyle optionalposition: namedpipeline: Falsevalues: 9
Built-in HTML style preset.
Possible values: Plain, Clean, GithubLight, GithubDark, GithubAuto, ChatLight, ChatDark, ChatAuto, Word
Title String optionalposition: namedpipeline: False
Optional title for HTML documents.

Outputs

System.String System.IO.FileInfo

ConvertTo-OfficeMarkdownHtml [-AssetMode <Online|Offline>] [-CssDelivery <Inline|ExternalFile|LinkHref>] [-DocumentMode] [-OutputPath <String>] [-PassThru] [-Profile <Nullable`1>] [-ReaderOptions <MarkdownReaderOptions>] [-Style <Plain>] -Text <String> [-Title <String>] [<CommonParameters>]
#
Parameter set: Text

Parameters

AssetMode AssetMode optionalposition: namedpipeline: Falsevalues: 2
Asset loading mode.
Possible values: Online, Offline
CssDelivery CssDelivery optionalposition: namedpipeline: Falsevalues: 3
CSS delivery mode.
Possible values: Inline, ExternalFile, LinkHref
DocumentMode SwitchParameter optionalposition: namedpipeline: False
Render a full HTML document instead of a fragment.
OutputPath String optionalposition: namedpipeline: Falsealiases: OutPath
Optional output path for the HTML file.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit a FileInfo when saving to disk.
Profile Nullable`1 optionalposition: namedpipeline: False
Named reader profile used when ReaderOptions is not supplied.
ReaderOptions MarkdownReaderOptions optionalposition: namedpipeline: False
Optional reader options when parsing Markdown.
Style HtmlStyle optionalposition: namedpipeline: Falsevalues: 9
Built-in HTML style preset.
Possible values: Plain, Clean, GithubLight, GithubDark, GithubAuto, ChatLight, ChatDark, ChatAuto, Word
Text String requiredposition: namedpipeline: False
Markdown text to convert.
Title String optionalposition: namedpipeline: False
Optional title for HTML documents.

Outputs

System.String System.IO.FileInfo

ConvertTo-OfficeMarkdownHtml [-AssetMode <Online|Offline>] [-CssDelivery <Inline|ExternalFile|LinkHref>] -Document <MarkdownDoc> [-DocumentMode] [-OutputPath <String>] [-PassThru] [-Profile <Nullable`1>] [-ReaderOptions <MarkdownReaderOptions>] [-Style <Plain>] [-Title <String>] [<CommonParameters>]
#
Parameter set: Document

Parameters

AssetMode AssetMode optionalposition: namedpipeline: Falsevalues: 2
Asset loading mode.
Possible values: Online, Offline
CssDelivery CssDelivery optionalposition: namedpipeline: Falsevalues: 3
CSS delivery mode.
Possible values: Inline, ExternalFile, LinkHref
Document MarkdownDoc requiredposition: namedpipeline: True (ByValue)
Markdown document to convert.
DocumentMode SwitchParameter optionalposition: namedpipeline: False
Render a full HTML document instead of a fragment.
OutputPath String optionalposition: namedpipeline: Falsealiases: OutPath
Optional output path for the HTML file.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit a FileInfo when saving to disk.
Profile Nullable`1 optionalposition: namedpipeline: False
Named reader profile used when ReaderOptions is not supplied.
ReaderOptions MarkdownReaderOptions optionalposition: namedpipeline: False
Optional reader options when parsing Markdown.
Style HtmlStyle optionalposition: namedpipeline: Falsevalues: 9
Built-in HTML style preset.
Possible values: Plain, Clean, GithubLight, GithubDark, GithubAuto, ChatLight, ChatDark, ChatAuto, Word
Title String optionalposition: namedpipeline: False
Optional title for HTML documents.

Outputs

System.String System.IO.FileInfo