API Reference
Command
ConvertTo-OfficeMarkdownHtml
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:
PathParameters
- AssetMode AssetMode
- Asset loading mode.
- Possible values:
Online,Offline - CssDelivery CssDelivery
- CSS delivery mode.
- Possible values:
Inline,ExternalFile,LinkHref - DocumentMode SwitchParameter
- Render a full HTML document instead of a fragment.
- InputPath String
- Path to the Markdown file.
- OutputPath String
- Optional output path for the HTML file.
- PassThru SwitchParameter
- Emit a FileInfo when saving to disk.
- Profile Nullable`1
- Named reader profile used when ReaderOptions is not supplied.
- ReaderOptions MarkdownReaderOptions
- Optional reader options when parsing Markdown.
- Style HtmlStyle
- Built-in HTML style preset.
- Possible values:
Plain,Clean,GithubLight,GithubDark,GithubAuto,ChatLight,ChatDark,ChatAuto,Word - Title String
- 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:
TextParameters
- AssetMode AssetMode
- Asset loading mode.
- Possible values:
Online,Offline - CssDelivery CssDelivery
- CSS delivery mode.
- Possible values:
Inline,ExternalFile,LinkHref - DocumentMode SwitchParameter
- Render a full HTML document instead of a fragment.
- OutputPath String
- Optional output path for the HTML file.
- PassThru SwitchParameter
- Emit a FileInfo when saving to disk.
- Profile Nullable`1
- Named reader profile used when ReaderOptions is not supplied.
- ReaderOptions MarkdownReaderOptions
- Optional reader options when parsing Markdown.
- Style HtmlStyle
- Built-in HTML style preset.
- Possible values:
Plain,Clean,GithubLight,GithubDark,GithubAuto,ChatLight,ChatDark,ChatAuto,Word - Text String
- Markdown text to convert.
- Title String
- 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:
DocumentParameters
- AssetMode AssetMode
- Asset loading mode.
- Possible values:
Online,Offline - CssDelivery CssDelivery
- CSS delivery mode.
- Possible values:
Inline,ExternalFile,LinkHref - Document MarkdownDoc
- Markdown document to convert.
- DocumentMode SwitchParameter
- Render a full HTML document instead of a fragment.
- OutputPath String
- Optional output path for the HTML file.
- PassThru SwitchParameter
- Emit a FileInfo when saving to disk.
- Profile Nullable`1
- Named reader profile used when ReaderOptions is not supplied.
- ReaderOptions MarkdownReaderOptions
- Optional reader options when parsing Markdown.
- Style HtmlStyle
- Built-in HTML style preset.
- Possible values:
Plain,Clean,GithubLight,GithubDark,GithubAuto,ChatLight,ChatDark,ChatAuto,Word - Title String
- Optional title for HTML documents.
Outputs
System.String System.IO.FileInfo