summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-21 17:12:42 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-22 09:57:03 +0100
commita5b3b076570eb87b856be964f36c3ef19fe1d7e2 (patch)
treec7742497386637825aa837a334414fb96b5e60a7 /docs
parent382582fcda7b107b180c0a5fb795ed62c9c91284 (diff)
docs: Add Pages to variables section
And some other minor doc fixes. Closes #2297 Closes #2649
Diffstat (limited to 'docs')
-rw-r--r--docs/content/content/multilingual.md2
-rw-r--r--docs/content/overview/source-directory.md2
-rw-r--r--docs/content/templates/functions.md4
-rw-r--r--docs/content/templates/variables.md1
4 files changed, 5 insertions, 4 deletions
diff --git a/docs/content/content/multilingual.md b/docs/content/content/multilingual.md
index 44b425f95..a60ef24ff 100644
--- a/docs/content/content/multilingual.md
+++ b/docs/content/content/multilingual.md
@@ -190,7 +190,7 @@ The rendering of the main navigation works as usual. `.Site.Menus` will just con
```html
<ul>
- {{- $current := . -}}
+ {{- $currentPage := . -}}
{{ range .Site.Menus.main -}}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL | absLangURL }}">{{ .Name }}</a>
diff --git a/docs/content/overview/source-directory.md b/docs/content/overview/source-directory.md
index 5eef7c23c..3ac4be505 100644
--- a/docs/content/overview/source-directory.md
+++ b/docs/content/overview/source-directory.md
@@ -102,7 +102,7 @@ Since Hugo 0.18, "everything" is a `Page` that can have content and metadata, li
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.
diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md
index f51fa5a81..a2c560206 100644
--- a/docs/content/templates/functions.md
+++ b/docs/content/templates/functions.md
@@ -992,9 +992,9 @@ The response of the GitHub API contains the base64-encoded version of the [READM
## .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 }}
diff --git a/docs/content/templates/variables.md b/docs/content/templates/variables.md
index db24d3bb7..bcc060d3b 100644
--- a/docs/content/templates/variables.md
+++ b/docs/content/templates/variables.md
@@ -48,6 +48,7 @@ matter, content or derived from file location.
**.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>