Added the email property to the organization structured data in the Infrastructure package target.
This commit is contained in:
@@ -49,6 +49,7 @@ public extension StructuredData {
|
||||
/// - alternateName: the name the organization is also known by, or `nil` (the default) to omit its property.
|
||||
/// - description: what the organization does, or `nil` (the default) to omit its property.
|
||||
/// - areaServed: the area the organization serves, or `nil` (the default) to omit its property.
|
||||
/// - email: the address the organization is written to, or `nil` (the default) to omit its property.
|
||||
/// - logo: the absolute URL of the organization's logo, or `nil` (the default) to omit its property.
|
||||
/// - profiles: the absolute URLs of the organization's public profiles, or empty (the default) to omit their property.
|
||||
init(
|
||||
@@ -57,6 +58,7 @@ public extension StructuredData {
|
||||
alternateName: String? = nil,
|
||||
description: String? = nil,
|
||||
areaServed: String? = nil,
|
||||
email: String? = nil,
|
||||
logo: String? = nil,
|
||||
profiles: [String] = []
|
||||
) {
|
||||
@@ -79,6 +81,10 @@ public extension StructuredData {
|
||||
organization.append(.init(.areaServed, value: .string(areaServed)))
|
||||
}
|
||||
|
||||
if let email {
|
||||
organization.append(.init(.email, value: .string(email)))
|
||||
}
|
||||
|
||||
if let logo {
|
||||
organization.append(.init(.logo, value:.string(logo)))
|
||||
}
|
||||
|
||||
+2
@@ -75,6 +75,8 @@ public extension StructuredData.Property.Name {
|
||||
static let areaServed: Self = "areaServed"
|
||||
/// What the thing a node describes is or does.
|
||||
static let description: Self = "description"
|
||||
/// The address the thing a node describes is written to.
|
||||
static let email: Self = "email"
|
||||
/// The absolute URL of an organization's logo.
|
||||
static let logo: Self = "logo"
|
||||
/// The name of the thing a node describes.
|
||||
|
||||
Reference in New Issue
Block a user