Skip to content

Commit 14f695e

Browse files
Clarifying documentation around themes. (#1541)
- Defined a theme in Zola - Clarified configuration of themes - Clarified theme template functionality
1 parent 252f3b3 commit 14f695e

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

docs/content/documentation/themes/extending-a-theme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
+++
2-
title = "Extending a theme"
2+
title = "Customizing a theme"
33
weight = 30
44
+++
55

66
When your site uses a theme, you can replace parts of it in your site's templates folder. For any given theme template, you can either override a single block in it, or replace the whole template. If a site template and a theme template collide, the site template will be given priority. Whether a theme template collides or not, theme templates remain accessible from any template within `theme_name/templates/`.
77

88
## Replacing a template
99

10-
When a site template and a theme template have the same path, for example `templates/page.html` and `themes/theme_name/templates/page.html`, the site template is the one that will be used. This is how you can replace a whole template for a theme.
10+
When your site uses a theme, the generated structure follows the theme's structure whenever possible, i.e. there are no user defined templates with the same name and relative path as the theme's; for example: with two files `templates/page.html` and `themes/theme_name/templates/page.html`, the site template is the one that will be used. Such a conflict results in the theme's template being ignored in favor of the template defined by the user.
1111

1212
## Overriding a block
1313

docs/content/documentation/themes/installing-and-using-themes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ name has to be the name of the directory you cloned the theme in.
2929
For example, if you cloned a theme in `themes/simple-blog`, the theme name to use
3030
in the configuration file is `simple-blog`. Also make sure to place the variable in the top level of the
3131
`.toml` hierarchy and not after a dict like [extra] or [markdown].
32+
Some themes require additional configuration before they can work properly. Be sure to follow the instructions found on your chosen theme's documentation to properly configure the theme.
3233

3334
## Customizing a theme
3435

docs/content/documentation/themes/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ title = "Overview"
33
weight = 10
44
+++
55

6-
Zola has built-in support for themes that makes it easy to customise and update them.
6+
Themes are collections of layouts and styles used to facilitate the creation and management of Zola projects. As such, themes are Zola projects which provide their own templates, content and even static assets.
7+
8+
Zola has built-in support for themes which makes it easy to customise and update them.
79

810
All themes can use the full power of Zola, from shortcodes to Sass compilation.
911

0 commit comments

Comments
 (0)