mirror of
https://github.com/getzola/zola
synced 2024-11-10 06:14:19 +00:00
Clarifying documentation around themes. (#1541)
- Defined a theme in Zola - Clarified configuration of themes - Clarified theme template functionality
This commit is contained in:
parent
252f3b3136
commit
14f695e682
3 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
+++
|
||||
title = "Extending a theme"
|
||||
title = "Customizing a theme"
|
||||
weight = 30
|
||||
+++
|
||||
|
||||
|
@ -7,7 +7,7 @@ When your site uses a theme, you can replace parts of it in your site's template
|
|||
|
||||
## Replacing a template
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## Overriding a block
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ name has to be the name of the directory you cloned the theme in.
|
|||
For example, if you cloned a theme in `themes/simple-blog`, the theme name to use
|
||||
in the configuration file is `simple-blog`. Also make sure to place the variable in the top level of the
|
||||
`.toml` hierarchy and not after a dict like [extra] or [markdown].
|
||||
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.
|
||||
|
||||
## Customizing a theme
|
||||
|
||||
|
|
|
@ -3,7 +3,9 @@ title = "Overview"
|
|||
weight = 10
|
||||
+++
|
||||
|
||||
Zola has built-in support for themes that makes it easy to customise and update them.
|
||||
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.
|
||||
|
||||
Zola has built-in support for themes which makes it easy to customise and update them.
|
||||
|
||||
All themes can use the full power of Zola, from shortcodes to Sass compilation.
|
||||
|
||||
|
|
Loading…
Reference in a new issue