Socialify

Folder ..

Viewing theme-versioning.md
48 lines (38 loc) • 1.3 KB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Theme Versioning

In `templates/@theme-base/` there is a `_version.scss` partial. This partial includes a single line of code that aids in keeping the version of all themes up to date:

```scss
$version: 'v4.0.0-beta15';
```

This variable is used in all themes by default and it will print the current version when a theme is compiled. For example, this theme header:

```scss
@import "../@theme-base/version";

/*! =========================================== *
 * SLICK THEME
 * Version: #{$version}
 * Author: ProtonMail
 * Website: www.protonmail.com
 * Twitter: @protonmail
 * =========================================== */
```

Will compile to:

```scss
/*! =========================================== *
 * SLICK THEME
 * Version: v4.0.0-beta15
 * Author: ProtonMail
 * Website: www.protonmail.com
 * Twitter: @protonmail
 * =========================================== */
```

In some cases a theme might have a specific version it is compatible with. In that case the variable can be pointed to another version on the theme template file:

```scss
@import "../@theme-base/version";
$version: "v4.0.0-beta3";

/*! =========================================== *
 * SLICK THEME
 * Version: #{$version}
 * Author: ProtonMail
 * Website: www.protonmail.com
 * Twitter: @protonmail
 * =========================================== */
```