Skip to content

Commit

Permalink
clarify that the theme file must end with .yml, not .yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Sep 15, 2024
1 parent 1246cb8 commit ea290ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/modules/theme/pages/apply-theme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ If the value of the `pdf-theme` attribute doesn't end with `.yml` (e.g., `base`)
The value is then treated as a relative path (even if it's absolute) and resolved starting from the value of the `pdf-themesdir` attribute.
If the `pdf-themesdir` is not specified, the built-in themes directory is used as the starting point instead (rather than the current working directory).
+
IMPORTANT: The theme file *must* end in .yml, not .yaml.
When the theme path specified does not end in .yml, Asciidoctor PDF appends the suffix `-theme.yml` and looks for the resulting file.
+
You can use the `+{docdir}+` token as the first path segment in the name to build an absolute path starting from the directory of the source document.
+
The theme name or file path can be specified using the `--theme` CLI option as a shorthand.
Expand Down
4 changes: 4 additions & 0 deletions docs/modules/theme/pages/create-theme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ An Asciidoctor PDF theme is defined using a YAML data file that ends with `-them
No keys are actually required.
Each key you specify will customize the styling in some way that differs from the intrinsic defaults.

IMPORTANT: The theme file *must* end in .yml, not .yaml.
When the theme path specified does not end in .yml, Asciidoctor PDF appends the suffix `-theme.yml` and looks for the resulting file.
Thus, the `-theme` segment is optional if you include the .yml file extension when specifying the theme path.

For example, you can define a theme to set the page size to Letter (which differs from the default, which is A4).

.my-theme.yml
Expand Down

0 comments on commit ea290ed

Please sign in to comment.