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

74 lines
1.5 KiB
Markdown

title: Installing a theme
---
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 distibute by github repos, so you could install a theme by
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 to only load
a particular theme.
!!!! Not implemeted yet.
You could add the `themes` variable to the `.lektorproject` file and lektor will
search in the (community themes)[/themes] and automatically install it.
```ini
[project]
themes = lextor-theme-nix
```
## Installing multiple themes
Lektor also support installing several themes, copy them to the `themes/`
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
```
This will make `lektor-theme-nix`, to have a higher precedence, and files present
in both themes will be loaded from it.
!! If you don't set `themes` variable, all themes will be loaded, but the order
isn't preserved.