lektor-website/content/docs/themes/installing/contents.lr

75 lines
1.6 KiB
Plaintext
Raw Normal View History

2018-01-11 23:53:29 +01:00
title: Installing a Theme
2017-10-26 00:22:17 +02:00
---
sort_key: 10
---
summary: Explains how to install Lektor themes.
---
body:
For installing a theme you just need to copy it to the `themes/` folder
```
project
├── assets
├── models
├── content
...
└── themes
└── lektor-theme-nix
```
Themes are normally distributed by public Git repositories, so you could install a theme by
2017-10-26 00:22:17 +02:00
cloning the repo:
```bash
cd themes
git clone URL_TO_THEME_REPO
```
For example, for installing `lektor-theme-nix`:
```bash
cd themes
git clone https://github.com/rlaverde/lektor-theme-nix.git
```
If you download several themes, setting `themes` variable will allow you to only load
2017-10-26 00:22:17 +02:00
a particular theme.
!!!! Not implemented yet.
2017-10-26 00:22:17 +02:00
You could add the `themes` variable to the `.lektorproject` file and Lektor will
2017-10-26 00:22:17 +02:00
search in the (community themes)[/themes] and automatically install it.
```ini
[project]
themes = lextor-theme-nix
```
## Installing multiple themes
Lektor also supports installing several themes. Copy them to the `themes/`
2017-10-26 00:22:17 +02:00
folder, and set the `themes` variable to indicate the precedence (optional).
```
project
├── assets
├── models
├── content
...
└── themes
├── lektor-theme-other-theme/
└── lektor-theme-nix/
```
```ini
[project]
themes = lextor-theme-nix, lektor-theme-other-theme
2017-10-26 00:22:17 +02:00
```
This will make `lektor-theme-nix`, because it's listed first, have a higher precedence.
Files present in multiple themes will be loaded from right to left, so that the first (left-most)
theme is preferred over the theme(s) to its right.
2017-10-26 00:22:17 +02:00
!! If you don't set the `themes` variable, all themes will be loaded, but the order
2017-10-26 00:22:17 +02:00
isn't preserved.