Reworded the documentation of the organization identifier helper in the Infrastructure package target.

This commit is contained in:
2026-08-24 22:31:44 +02:00
parent 0ee8368e1a
commit eb0a2127f6
2 changed files with 4 additions and 4 deletions
@@ -25,10 +25,10 @@ public struct StructuredData: Equatable, Sendable {
// MARK: Methods // MARK: Methods
/// The `@id` of the `Organization` node ``init(name:url:alternateName:description:areaServed:email:logo:profiles:)`` builds. /// The `@id` of the `Organization` node the site-wide initializer builds.
/// ///
/// A page on another path that asserts a relationship to the organization a `Person`'s `worksFor`, say references this rather than /// A page asserting a relationship to it a `Person`'s `worksFor`, say references this instead of spelling the fragment again, so the two
/// spelling the fragment a second time, so the two can never drift apart. /// cannot drift.
/// - Parameter url: the absolute URL the site is served at, as passed to that initializer. /// - Parameter url: the absolute URL the site is served at, as passed to that initializer.
/// - Returns: the organization node's `@id`. /// - Returns: the organization node's `@id`.
public static func organizationID( public static func organizationID(
@@ -54,7 +54,7 @@ struct StructuredDataTests {
url: url url: url
) )
// The helper is what another page references the organization by, so it has to name the node this actually builds. // Another page references the organization by this, so it must name the node the initializer actually builds.
#expect(StructuredData.organizationID(forSiteURL: url) == "https://site.example/#organization") #expect(StructuredData.organizationID(forSiteURL: url) == "https://site.example/#organization")
#expect(data.payload.contains(##""@id":"\##(StructuredData.organizationID(forSiteURL: url))""##)) #expect(data.payload.contains(##""@id":"\##(StructuredData.organizationID(forSiteURL: url))""##))
} }