diff --git a/Sources/SwiftDocC/Semantics/Metadata/Metadata.swift b/Sources/SwiftDocC/Semantics/Metadata/Metadata.swift index ef351cd74f..86b8711ef9 100644 --- a/Sources/SwiftDocC/Semantics/Metadata/Metadata.swift +++ b/Sources/SwiftDocC/Semantics/Metadata/Metadata.swift @@ -23,6 +23,7 @@ import Markdown /// - ``TechnologyRoot`` /// - ``DisplayName`` /// - ``PageImage`` +/// - ``PageColor`` /// - ``CallToAction`` /// - ``Availability`` /// - ``PageKind`` diff --git a/Sources/docc/DocCDocumentation.docc/customizing-the-appearance-of-your-documentation-pages.md b/Sources/docc/DocCDocumentation.docc/customizing-the-appearance-of-your-documentation-pages.md index 6182e81996..8e73b037b5 100644 --- a/Sources/docc/DocCDocumentation.docc/customizing-the-appearance-of-your-documentation-pages.md +++ b/Sources/docc/DocCDocumentation.docc/customizing-the-appearance-of-your-documentation-pages.md @@ -79,7 +79,8 @@ of a green hue. As a general rule, the default color properties provided by DocC assumes a naming convention where "fill" colors are used for backgrounds and "figure" -colors are used for foreground colors, like text. +colors are used for foreground colors, like text. Note that colors defined in +`theme-settings.json` will be used across all pages of your documentation bundle. > Tip: > For a more complete example of a fully customized documentation website, you @@ -239,6 +240,16 @@ be added as necessary for other features. } ``` +### Customizing the appearance of specific pages + +Aside from the customizations available via `theme-settings.json`, Swift DocC +provides several directives that allow you to customize just +one specific Article page. + +Most notably: +- ``PageImage`` allows you to set a header image of a page. +- ``PageColor`` allows you to set an accent color of a page. + [1]: https://github.com/apple/swift-docc/blob/main/Sources/SwiftDocC/SwiftDocC.docc/Resources/ThemeSettings.spec.json [2]: https://drafts.csswg.org/css-variables/ [3]: https://mportiz08.github.io/swift-docc/documentation/docc