Debian Codegraph @

docs/content/en/methods/site/Version.md

raw
1 ---
2 title: Version
3 description: Returns the Version object for the given site.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 returnType: versions.Version
9 signatures: [SITE.Version]
10 ---
11
12 {{< new-in 0.153.0 />}}
13
14 ## Overview
15
16 The `Version` method on a `Site` object returns the `Version` object for the given site, derived from the version definition in your project configuration.
17
18 ## Methods
19
20 Use these methods on the `Version` object.
21
22 `IsDefault`
23 : (`bool`) Reports whether this is the [default version](g).
24
25 ```go-html-template
26 {{ .Site.Version.IsDefault }} → true
27 ```
28
29 `Name`
30 : (`string`) Returns the version name. This is the lowercased key from your project configuration.
31
32 ```go-html-template
33 {{ .Site.Version.Name }} → v1.0.0
34 ```