diff options
-rw-r--r-- | docs/content/templates/terms.md | 26 | ||||
-rw-r--r-- | docs/content/templates/variables.md | 4 |
2 files changed, 28 insertions, 2 deletions
diff --git a/docs/content/templates/terms.md b/docs/content/templates/terms.md index 3c9f5445d..858eeccf7 100644 --- a/docs/content/templates/terms.md +++ b/docs/content/templates/terms.md @@ -89,6 +89,32 @@ content tagged with each tag. {{ partial "footer.html" }} +Another example listing the content for each term (ordered by Date) + + + {{ partial "header.html" . }} + {{ partial "subheader.html" . }} + + <section id="main"> + <div> + <h1 id="title">{{ .Title }}</h1> + + {{ $data := .Data }} + {{ range $key,$value := .Data.Terms.ByCount }} + <h2><a href="{{ $data.Plural }}/{{ $value.Name | urlize }}"> {{ $value.Name }} </a> {{ $value.Count }} </h2> + <ul> + {{ range $value.Pages.ByDate }} + <li> + <a href="{{ .Permalink }}">{{ .Title }}</a> + </li> + {{ end }} + </ul> + {{ end }} + </div> + </section> + + {{ partial "footer.html" }} + ## Ordering Hugo can order the meta data in two different ways. It can be ordered by the diff --git a/docs/content/templates/variables.md b/docs/content/templates/variables.md index f76a6465c..2a6ef22a0 100644 --- a/docs/content/templates/variables.md +++ b/docs/content/templates/variables.md @@ -34,7 +34,7 @@ matter, content or derived from file location. **.Permalink** The Permanent link for this page.<br> **.RelPermalink** The Relative permanent link for this page.<br> **.LinkTitle** Access when creating links to this content. Will use linktitle if set in front-matter, else title<br> -**.Indexes** These will use the field name of the plural form of the index (see tags and categories above)<br> +**.Taxonomies** These will use the field name of the plural form of the index (see tags and categories above)<br> **.RSSLink** Link to the indexes' rss link <br> **.TableOfContents** The rendered table of contents for this content<br> **.Prev** Pointer to the previous content (based on pub date)<br> @@ -76,7 +76,7 @@ includes indexes, lists and the homepage. Also available is `.Site` which has the following: **.Site.BaseUrl** The base URL for the site as defined in the config.json file.<br> -**.Site.Indexes** The indexes for the entire site.<br> +**.Site.Taxonomies** The indexes for the entire site.<br> **.Site.LastChange** The date of the last change of the most recent content.<br> **.Site.Recent** Array of all content ordered by Date, newest first.<br> **.Site.Params** A container holding the values from `params` in your site configuration file.<br> |