diff options
author | Matthieu Bresson <matthieu.bresson@outlook.com> | 2017-06-09 20:55:02 +0200 |
---|---|---|
committer | digitalcraftsman <digitalcraftsman@protonmail.com> | 2017-06-11 18:52:26 +0200 |
commit | 39408925fd649ff202470c300d79bff457e52bcc (patch) | |
tree | 05f4d563a5e7a540b081b17b1b6852c575f80b04 | |
parent | 00d632153aa4b24799b4b3c16f684533cca0aea5 (diff) |
docs: change .Site to $.Site where the global context is masked by the term's context
-rw-r--r-- | docs/content/templates/terms.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/content/templates/terms.md b/docs/content/templates/terms.md index f81fc8f71..83414ceed 100644 --- a/docs/content/templates/terms.md +++ b/docs/content/templates/terms.md @@ -87,7 +87,7 @@ content tagged with each tag. <ul> {{ $data := .Data }} {{ range $key, $value := .Data.Terms }} - <li><a href="{{ .Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $key | urlize }}">{{ $key }}</a> {{ len $value }}</li> + <li><a href="{{ $.Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $key | urlize }}">{{ $key }}</a> {{ len $value }}</li> {{ end }} </ul> </div> @@ -107,7 +107,7 @@ Another example listing the content for each term (ordered by Date): {{ $data := .Data }} {{ range $key,$value := .Data.Terms.ByCount }} - <h2><a href="{{ .Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> {{ $value.Count }}</h2> + <h2><a href="{{ $.Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> {{ $value.Count }}</h2> <ul> {{ range $value.Pages.ByDate }} <li><a href="{{ .Permalink }}">{{ .Title }}</a></li> @@ -138,7 +138,7 @@ Hugo can order the term meta data in two different ways. It can be ordered: <ul> {{ $data := .Data }} {{ range $key, $value := .Data.Terms.Alphabetical }} - <li><a href="{{ .Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> {{ $value.Count }}</li> + <li><a href="{{ $.Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> {{ $value.Count }}</li> {{ end }} </ul> </div> @@ -156,7 +156,7 @@ Hugo can order the term meta data in two different ways. It can be ordered: <ul> {{ $data := .Data }} {{ range $key, $value := .Data.Terms.ByCount }} - <li><a href="{{ .Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> {{ $value.Count }}</li> + <li><a href="{{ $.Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> {{ $value.Count }}</li> {{ end }} </ul> </div> |