File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 99 signatures : [SITE.Home]
1010---
1111
12- This method is useful for obtaining a link to the home page.
12+ The ` Home ` method on a ` Site ` object is a convenient way to access the home page, and is functionally equivalent to:
13+
14+ ``` go-html-template
15+ {{ .Site.GetPage "/" }}
16+ ```
17+
18+ Because it returns a ` Page ` object, you can use any of the available [ page methods] [ ] by chaining them. For example:
19+
20+ ``` go-html-template
21+ {{ .Site.Home.Store.Set "greeting" "Hello" }}
22+ ```
23+
24+ This method is commonly used to generate a link to the home page. For example:
1325
1426Site configuration:
1527
@@ -23,3 +35,5 @@ Template:
2335{{ .Site.Home.Permalink }} → https://example.org/docs/
2436{{ .Site.Home.RelPermalink }} → /docs/
2537```
38+
39+ [ page methods ] : /methods/page/
You can’t perform that action at this time.
0 commit comments