Skip to content

Commit c2d29bf

Browse files
committed
docs: Add @PageColor to the customization guide
1 parent 150013e commit c2d29bf

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Sources/SwiftDocC/Semantics/Metadata/Metadata.swift

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import Markdown
2323
/// - ``TechnologyRoot``
2424
/// - ``DisplayName``
2525
/// - ``PageImage``
26+
/// - ``PageColor``
2627
/// - ``CallToAction``
2728
/// - ``Availability``
2829
/// - ``PageKind``

Sources/docc/DocCDocumentation.docc/customizing-the-appearance-of-your-documentation-pages.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,26 @@ of a green hue.
7979

8080
As a general rule, the default color properties provided by DocC assumes a
8181
naming convention where "fill" colors are used for backgrounds and "figure"
82-
colors are used for foreground colors, like text.
82+
colors are used for foreground colors, like text. Note that colors defined in
83+
`theme-settings.json` will be used across all pages of your documentation bundle.
84+
85+
**Changing a color on for a specific article page**
86+
87+
You can also use a ``PageColor`` metadata directive to set the fill color for an
88+
intro section of a specific article:
89+
90+
```
91+
# What's New in SlothCreator
92+
93+
@Metadata {
94+
@PageColor(blue)
95+
}
96+
97+
...
98+
```
99+
100+
`@PageColor` only supports a subset of predefined color values: `blue`,
101+
`gray`, `green`, `orange`, `purple`, `red`, `yellow`.
83102

84103
> Tip:
85104
> For a more complete example of a fully customized documentation website, you

0 commit comments

Comments
 (0)