summaryrefslogtreecommitdiff
path: root/docs/modules/theme/pages/extends.adoc
blob: e9a5b17c603e4add38a5d7e0b06d92e23dce565d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
= Extends Category Key
:description: Reference list of the extends category key and its value types.
:navtitle: Extends
:source-language: yaml

A theme can extend another theme using the `extends` key.

The `extends` key accepts either a single value or an array of values.
Each value is interpreted as a filename.
If the filename equals `default`, it resolves to the location of the default (built-in) theme.
If the filename is absolute, it's used as is.
If the filename begins with `./`, it's resolved as a theme file relative to the current theme file.
Otherwise, the filename is resolved as a theme file in the normal way (relative to the value of the `pdf-themesdir` attribute).

Currently, the theme starts out empty.
Then, the files referenced by the extends key are loaded in order.
Finally, the keys in the current file are loaded.
Each time a theme is loaded, the keys are overlaid onto the keys from the previous theme.

[cols="4,4,6a"]
|===
|Key |Value Type |Example

|extends
|String or Array +
(default: `[]`)
|[source]
extends:
- default
- ./brand-theme.yml
|===