API Reference
Cmdlet
Get-OfficeMarkdownFrontMatter
Gets YAML front matter entries from a Markdown document.
Remarks
Gets YAML front matter entries from a Markdown document.
Examples
Read selected front matter from a Markdown file.
PS>
$metadata = Get-OfficeMarkdownFrontMatter -Path .\Report.md -Key 'title'
$metadata |
Select-Object -Property Key, Value |
Format-Table -AutoSize
Parses a Markdown file and returns matching front matter entries for metadata proof.
Parse front matter from generated text.
PS>
$markdown = "---`ntitle: Report`nstatus: Ready`n---`n# Report"
Get-OfficeMarkdownFrontMatter -Text $markdown |
Select-Object -Property Key, Value
Parses Markdown text directly when the document has not been saved yet.
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
Get-OfficeMarkdownFrontMatter [-AllowDataUrls <Boolean>] [-AllowedUrlScheme <String[]>] [-AllowMailtoUrls <Boolean>] [-AllowProtocolRelativeUrls <Boolean>] [-BaseUri <String>] [-CaseSensitive] [-DisallowFileUrls <Boolean>] -InputPath <String> [-Key <String>] [-MaxInputCharacters <Int32>] [-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>] [-Options <MarkdownReaderOptions>] [-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>] [-RestrictUrlSchemes <Boolean>] [<CommonParameters>]#Parameter set:
PathParameters
- AllowDataUrls Boolean
- Allow data URLs while parsing Markdown links and images.
- AllowedUrlScheme String[]
- Allowed URL schemes when URL scheme restriction is enabled.
- AllowMailtoUrls Boolean
- Allow mailto URLs while parsing Markdown links.
- AllowProtocolRelativeUrls Boolean
- Allow protocol-relative URLs while parsing Markdown links and images.
- BaseUri String
- Base URI used to resolve and restrict relative Markdown links and images.
- CaseSensitive SwitchParameter
- Use case-sensitive matching for key filters.
- DisallowFileUrls Boolean
- Block file URLs while parsing Markdown links and images.
- InputPath String
- Path to the Markdown file.
- Key String
- Optional wildcard pattern matched against front matter keys.
- MaxInputCharacters Int32
- Maximum Markdown input length accepted by the reader.
- NormalizeInput MarkdownInputNormalizationPreset
- Applies a built-in Markdown input normalization preset before parsing.
- Possible values:
IntelligenceXTranscript,IntelligenceXTranscriptStrict,DocsLoose - Options MarkdownReaderOptions
- Optional reader options used when parsing path or text input.
- Profile MarkdownDialectProfile
- Named reader profile used when Options is not supplied.
- Possible values:
OfficeIMO,CommonMark,GitHubFlavoredMarkdown,Portable - RestrictUrlSchemes Boolean
- Restrict parsed URL schemes to the allow-list.
Outputs
OfficeIMO.Markdown.FrontMatterBlock+Entry
Get-OfficeMarkdownFrontMatter [-AllowDataUrls <Boolean>] [-AllowedUrlScheme <String[]>] [-AllowMailtoUrls <Boolean>] [-AllowProtocolRelativeUrls <Boolean>] [-BaseUri <String>] [-CaseSensitive] [-DisallowFileUrls <Boolean>] -Document <MarkdownDoc> [-Key <String>] [-MaxInputCharacters <Int32>] [-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>] [-Options <MarkdownReaderOptions>] [-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>] [-RestrictUrlSchemes <Boolean>] [<CommonParameters>]#Parameter set:
DocumentParameters
- AllowDataUrls Boolean
- Allow data URLs while parsing Markdown links and images.
- AllowedUrlScheme String[]
- Allowed URL schemes when URL scheme restriction is enabled.
- AllowMailtoUrls Boolean
- Allow mailto URLs while parsing Markdown links.
- AllowProtocolRelativeUrls Boolean
- Allow protocol-relative URLs while parsing Markdown links and images.
- BaseUri String
- Base URI used to resolve and restrict relative Markdown links and images.
- CaseSensitive SwitchParameter
- Use case-sensitive matching for key filters.
- DisallowFileUrls Boolean
- Block file URLs while parsing Markdown links and images.
- Document MarkdownDoc
- Markdown document to inspect.
- Key String
- Optional wildcard pattern matched against front matter keys.
- MaxInputCharacters Int32
- Maximum Markdown input length accepted by the reader.
- NormalizeInput MarkdownInputNormalizationPreset
- Applies a built-in Markdown input normalization preset before parsing.
- Possible values:
IntelligenceXTranscript,IntelligenceXTranscriptStrict,DocsLoose - Options MarkdownReaderOptions
- Optional reader options used when parsing path or text input.
- Profile MarkdownDialectProfile
- Named reader profile used when Options is not supplied.
- Possible values:
OfficeIMO,CommonMark,GitHubFlavoredMarkdown,Portable - RestrictUrlSchemes Boolean
- Restrict parsed URL schemes to the allow-list.
Outputs
OfficeIMO.Markdown.FrontMatterBlock+Entry
Get-OfficeMarkdownFrontMatter [-AllowDataUrls <Boolean>] [-AllowedUrlScheme <String[]>] [-AllowMailtoUrls <Boolean>] [-AllowProtocolRelativeUrls <Boolean>] [-BaseUri <String>] [-CaseSensitive] [-DisallowFileUrls <Boolean>] [-Key <String>] [-MaxInputCharacters <Int32>] [-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>] [-Options <MarkdownReaderOptions>] [-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>] [-RestrictUrlSchemes <Boolean>] -Text <String> [<CommonParameters>]#Parameter set:
TextParameters
- AllowDataUrls Boolean
- Allow data URLs while parsing Markdown links and images.
- AllowedUrlScheme String[]
- Allowed URL schemes when URL scheme restriction is enabled.
- AllowMailtoUrls Boolean
- Allow mailto URLs while parsing Markdown links.
- AllowProtocolRelativeUrls Boolean
- Allow protocol-relative URLs while parsing Markdown links and images.
- BaseUri String
- Base URI used to resolve and restrict relative Markdown links and images.
- CaseSensitive SwitchParameter
- Use case-sensitive matching for key filters.
- DisallowFileUrls Boolean
- Block file URLs while parsing Markdown links and images.
- Key String
- Optional wildcard pattern matched against front matter keys.
- MaxInputCharacters Int32
- Maximum Markdown input length accepted by the reader.
- NormalizeInput MarkdownInputNormalizationPreset
- Applies a built-in Markdown input normalization preset before parsing.
- Possible values:
IntelligenceXTranscript,IntelligenceXTranscriptStrict,DocsLoose - Options MarkdownReaderOptions
- Optional reader options used when parsing path or text input.
- Profile MarkdownDialectProfile
- Named reader profile used when Options is not supplied.
- Possible values:
OfficeIMO,CommonMark,GitHubFlavoredMarkdown,Portable - RestrictUrlSchemes Boolean
- Restrict parsed URL schemes to the allow-list.
- Text String
- Markdown text to parse.
Outputs
OfficeIMO.Markdown.FrontMatterBlock+Entry