CHGenerator/WebsiteGenerator/Content/Site+LocalizedMetadata.swift
Christoph Hagen 14b935249f First version
2022-08-16 10:39:05 +02:00

72 lines
1.7 KiB
Swift

import Foundation
extension Site {
struct LocalizedMetadata {
let languageIdentifier: String
let linkPreview: LinkPreviewMetadata?
let title: String
let subtitle: String?
let description: String
/**
The text on the back navigation link of contained elements.
This text does not appear on the section page, but on the pages contained within the section.
*/
let backLinkText: String?
/**
The back text to use for element which don't specify a `backLinkText` themselves.
*/
let defaultBackLinkText: String
/**
The text to show as a title for placeholder boxes
Placeholders are included in missing pages.
*/
let placeholderTitle: String
/**
The text to show as a description for placeholder boxes
Placeholders are included in missing pages.
*/
let placeholderText: String
}
}
extension Site.LocalizedMetadata: Codable {
}
extension Site.LocalizedMetadata: LanguageIdentifiable {
}
extension Site.LocalizedMetadata {
static var initial: Site.LocalizedMetadata {
.init(
languageIdentifier: "en",
linkPreview: .initial,
title: "Website name on front page",
subtitle: "Tag line on front page",
description: "Some text below the tag line on the title page",
backLinkText: "Back to start",
defaultBackLinkText: "Back",
placeholderTitle: "Content missing",
placeholderText: "This page is incomplete. Content will be added in the coming days.")
}
}
extension Site.LocalizedMetadata: LinkPreviewMetadataProvider {
}