Merge commit '87de22d7464e239c775fbd48ebce1665d5b1e80d'

This commit is contained in:
Bjørn Erik Pedersen
2023-07-29 11:17:28 +02:00
177 changed files with 1623 additions and 1556 deletions

View File

@@ -37,15 +37,15 @@ And since `Page` also provides a `.GetPage` method, the above is the same as:
{{ end }}
```
## .GetPage and Multilingual Sites
## .GetPage and multilingual sites
The previous examples have used the full content filename to look up the post. Depending on how you have organized your content (whether you have the language code in the file name or not, e.g. `my-post.en.md`), you may want to do the lookup without extension. This will get you the current language's version of the page:
The previous examples have used the full content file name to look up the post. Depending on how you have organized your content (whether you have the language code in the file name or not, e.g. `my-post.en.md`), you may want to do the lookup without extension. This will get you the current language's version of the page:
```go-html-template
{{ with .Site.GetPage "/blog/my-post" }}{{ .Title }}{{ end }}
```
## .GetPage Example
## .GetPage example
This code snippet---in the form of a [partial template][partials]---allows you to do the following:
@@ -63,7 +63,7 @@ This code snippet---in the form of a [partial template][partials]---allows you t
</ul>
{{< /code >}}
## `.GetPage` on Page Bundles
## `.GetPage` on page bundles
If the page retrieved by `.GetPage` is a [Leaf Bundle][leaf_bundle], and you
need to get the nested _**page** resources_ in that, you will need to use the