154 lines
4.9 KiB
Swift
154 lines
4.9 KiB
Swift
import Foundation
|
|
|
|
extension GenericMetadata {
|
|
|
|
/**
|
|
Metadata localized for a specific language.
|
|
*/
|
|
struct LocalizedMetadata {
|
|
|
|
/**
|
|
The language for which the content is specified.
|
|
- Note: This field is mandatory
|
|
*/
|
|
let language: String?
|
|
|
|
/**
|
|
The title used in the page header.
|
|
- Note: This field is mandatory
|
|
*/
|
|
let title: String?
|
|
|
|
/**
|
|
The subtitle used in the page header.
|
|
*/
|
|
let subtitle: String?
|
|
|
|
/**
|
|
The description text used in the page header
|
|
*/
|
|
let description: String?
|
|
|
|
/**
|
|
The title to use for the link preview.
|
|
|
|
If `nil` is specified, then the localized element `title` is used.
|
|
*/
|
|
let linkPreviewTitle: String?
|
|
|
|
/**
|
|
The file name of the link preview image.
|
|
- Note: The image must be located in the element folder.
|
|
- Note: If `nil` is specified, then the (localized) thumbnail is used.
|
|
*/
|
|
let linkPreviewImage: String?
|
|
|
|
/**
|
|
The description text for the link preview.
|
|
- Note: If `nil` is specified, then first the (localized) element `subtitle` is used.
|
|
If this is `nil` too, then the localized `description` of the element is used.
|
|
*/
|
|
let linkPreviewDescription: String?
|
|
|
|
/**
|
|
The text on the link to show the section page when previewing multiple sections on an overview page.
|
|
- Note: If this value is inherited from the parent, if it is not defined. There must be at least one
|
|
element in the path that defines this property.
|
|
*/
|
|
let moreLinkText: 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.
|
|
- Note: If this property is not specified, then the root `backLinkText` is used.
|
|
- Note: The root element must specify this property.
|
|
*/
|
|
let backLinkText: String?
|
|
|
|
/**
|
|
The text to show as a title for placeholder boxes
|
|
|
|
Placeholders are included in missing pages.
|
|
- Note: If no value is specified, then this property is inherited from the parent. The root element must specify this property.
|
|
*/
|
|
let placeholderTitle: String?
|
|
|
|
/**
|
|
The text to show as a description for placeholder boxes
|
|
|
|
Placeholders are included in missing pages.
|
|
- Note: If no value is specified, then this property is inherited from the parent. The root element must specify this property.
|
|
*/
|
|
let placeholderText: String?
|
|
|
|
/**
|
|
An optional suffix to add to the title on a page.
|
|
|
|
This can be useful to express a different author, project grouping, etc.
|
|
*/
|
|
let titleSuffix: String?
|
|
|
|
/**
|
|
An optional suffix to add to the thumbnail title of a page.
|
|
|
|
This can be useful to express a different author, project grouping, etc.
|
|
*/
|
|
let thumbnailSuffix: String?
|
|
|
|
/**
|
|
A text to place in the top right corner of a large thumbnail.
|
|
|
|
The text should be a very short string to fit into the corner, like `soon`, or `draft`
|
|
|
|
- Note: This property is ignored if `thumbnailStyle` is not `large`.
|
|
*/
|
|
let cornerText: String?
|
|
|
|
/**
|
|
The external url to use instead of automatically generating the page.
|
|
|
|
This property can be used for links to other parts of the site, like additional services.
|
|
It can also be set to manually write a page.
|
|
*/
|
|
let externalUrl: String?
|
|
|
|
/**
|
|
The text to display for content related to the current page.
|
|
|
|
This property is mandatory at root level, and is propagated to child elements.
|
|
*/
|
|
let relatedContentText: String?
|
|
|
|
/**
|
|
The text to display on a navigation element pointing to this element as the previous page.
|
|
|
|
This property is mandatory at root level, and is propagated to child elements.
|
|
*/
|
|
let navigationTextAsPreviousPage: String?
|
|
|
|
/**
|
|
The text to display on the navigation element pointing to this element as the next page.
|
|
|
|
This property is mandatory at root level, and is propagated to child elements.
|
|
*/
|
|
let navigationTextAsNextPage: String?
|
|
|
|
/**
|
|
The text to display above a slideshow for most recent items.
|
|
Only used for elements that define `showMostRecentSection = true`
|
|
*/
|
|
let mostRecentTitle: String?
|
|
|
|
/**
|
|
The text to display above a slideshow for featured items.
|
|
Only used for elements that define `showFeaturedSection = true`
|
|
*/
|
|
let featuredTitle: String?
|
|
}
|
|
}
|
|
|
|
extension GenericMetadata.LocalizedMetadata: Codable {
|
|
|
|
}
|