@@ -82,24 +82,6 @@ naming convention where "fill" colors are used for backgrounds and "figure"
82
82
colors are used for foreground colors, like text. Note that colors defined in
83
83
` theme-settings.json ` will be used across all pages of your documentation bundle.
84
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 ` .
102
-
103
85
> Tip:
104
86
> For a more complete example of a fully customized documentation website, you
105
87
> can check out [ this fork] [ 3 ] of the DocC documentation that is using this
@@ -258,6 +240,16 @@ be added as necessary for other features.
258
240
}
259
241
```
260
242
243
+ ### Customizing the appearance of specific pages
244
+
245
+ Aside from the customizations available via `theme-settings.json`, Swift DocC
246
+ provides several <doc :Metadata > directives that allow you to customize just
247
+ one specific Article page.
248
+
249
+ Most notably:
250
+ - ``PageImage`` allows you to set a header image of a page.
251
+ - ``PageColor`` allows you to set an accent color of a page.
252
+
261
253
[1]: https://github.com/apple/swift-docc/blob/main/Sources/SwiftDocC/SwiftDocC.docc/Resources/ThemeSettings.spec.json
262
254
[2]: https://drafts.csswg.org/css-variables/
263
255
[3]: https://mportiz08.github.io/swift-docc/documentation/docc
0 commit comments