Skip to content

Commit 123d11b

Browse files
author
James Brundage
committed
feat: OpenGraph.get_HTML ( Fixes #8 )
Adding Author and IconURI to OpenGraph module output
1 parent ca64404 commit 123d11b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Types/OpenGraph/get_HTML.ps1

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
if ($this.Description) {
33
"<meta name='description' content='$([Web.HttpUtility]::HtmlAttributeEncode($this.Description))' />"
44
}
5-
if ($this.PrivateData.PSData.IconUri) {
6-
5+
if ($this.Author) {
6+
"<meta name='article:author' content='$([Web.HttpUtility]::HtmlAttributeEncode($this.Author))' />"
77
}
8+
if ($this.PrivateData.PSData.IconUri) {
9+
"<meta property='og:image' content='$([Web.HttpUtility]::HtmlAttributeEncode($this.PrivateData.PSData.IconUri))' />"
10+
}
811
} else {
912
foreach ($property in $this.PSObject.Properties) {
1013
if ($property.Name -match ':') {

0 commit comments

Comments
 (0)