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 The `Version` method on a `Site` object returns the `Version` object for the given site, derived from the version definition in your project configuration.
15
16 ## Methods
17
18 ### IsDefault
19
20 (`bool`) Reports whether this is the [default version](g).
21
22 ```go-html-template
23 {{ .Site.Version.IsDefault }} → true
24 ```
25
26 ### Name
27
28 (`string`) Returns the version name. This is the lowercased key from your project configuration.
29
30 ```go-html-template
31 {{ .Site.Version.Name }} → v1.0.0
32 ```