import Foundation extension Site { struct Metadata { let author: String let ignoredSubFolders: Set let topBarTitle: String? /** The url where the site will be deployed. This value is required to build absolute links for link previews. - Note: The path does not need to contain a trailing slash. */ let deployedBaseUrl: String let languages: [LocalizedMetadata] static func write(to url: URL) throws { try Metadata.initial.writeJSON(to: url) } } } extension Site.Metadata: LanguageContainer { } extension Site.Metadata: Codable { } extension Site.Metadata: Metadata { static let fileName = "site.json" static var initial: Self { .init(author: "Author", ignoredSubFolders: ["templates"], topBarTitle: "Title", deployedBaseUrl: "http://example.com", languages: [.initial]) } }