ref: a5b3b076570eb87b856be964f36c3ef19fe1d7e2
parent: 382582fcda7b107b180c0a5fb795ed62c9c91284
author: Bjørn Erik Pedersen <[email protected]>
date: Mon Nov 21 12:12:42 EST 2016
docs: Add Pages to variables section And some other minor doc fixes. Closes #2297 Closes #2649
--- a/docs/content/content/multilingual.md
+++ b/docs/content/content/multilingual.md
@@ -190,7 +190,7 @@
```html
<ul>
- {{- $current := . -}}
+ {{- $currentPage := . -}}
{{ range .Site.Menus.main -}}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL | absLangURL }}">{{ .Name }}</a>
--- a/docs/content/overview/source-directory.md
+++ b/docs/content/overview/source-directory.md
@@ -102,7 +102,7 @@
To add content and frontmatter to the home page, a section, a taxonomy or a taxonomy terms listing, add a markdown file with the base name `_index` on the relevant place on the file system.
-For the default Markdown content, the filename will be `_index.html`.
+For the default Markdown content, the filename will be `_index.md`.
Se the example directory tree below.
--- a/docs/content/templates/functions.md
+++ b/docs/content/templates/functions.md
@@ -992,9 +992,9 @@
## .Site.GetPage
-Every `Page` as a `Kind` attribute that shows what kind of page it is. While this attribute can be used to list pages of a certain `kind` using `where`, often it can be useful to fetch a single page by its path.
+Every `Page` has a `Kind` attribute that shows what kind of page it is. While this attribute can be used to list pages of a certain `kind` using `where`, often it can be useful to fetch a single page by its path.
-GetPage looks up an index page of a given `Kind` and `path`. This method may support regular pages in the future, but currently it is a convenient way of getting the index pages such as the home page or a section from a template:
+`GetPage` looks up an index page of a given `Kind` and `path`. This method may support regular pages in the future, but currently it is a convenient way of getting the index pages, such as the home page or a section, from a template:
```
{{ with .Site.GetPage "section" "blog" }}{{ .Title }}{{ end }}
--- a/docs/content/templates/variables.md
+++ b/docs/content/templates/variables.md
@@ -48,6 +48,7 @@
**.LinkTitle** Access when creating links to this content. Will use `linktitle` if set in front matter, else `title`.<br>
**.Next** Pointer to the following content (based on pub date).<br>
**.NextInSection** Pointer to the following content within the same section (based on pub date)<br>
+**.Pages** a collection of associated pages. This will be nil for regular content pages. This is an alias for **.Data.Pages**.
**.Permalink** The Permanent link for this page.<br>
**.Prev** Pointer to the previous content (based on pub date).<br>
**.PrevInSection** Pointer to the previous content within the same section (based on pub date). For example, `{{if .PrevInSection}}{{.PrevInSection.Permalink}}{{end}}`.<br>