diff --git a/content/templates/lists.md b/content/templates/lists.md index 91d6404be..8b40f2ddc 100644 --- a/content/templates/lists.md +++ b/content/templates/lists.md @@ -364,19 +364,17 @@ Order based on the specified front matter parameter. Content that does not have {{% code file="layouts/partials/by-rating.html" %}} ```html - + {{ range (.Data.Pages.ByParam "rating") }} {{ end }} ``` {{% /code %}} -If the front matter field of interest is nested beneath another field, you can -also get it: +If the targeted front matter field is nested beneath another field, you can access the field using dot notation. {{% code file="layouts/partials/by-nested-param.html" %}} ```html - {{ range (.Data.Pages.ByParam "author.last_name") }} {{ end }} @@ -389,12 +387,14 @@ Reversing order can be applied to any of the above methods. The following uses ` {{% code file="layouts/partials/by-date-reverse.html" %}} ```html -{{ range .Data.Pages.ByDate.Reverse }} -
  • -{{ .Title }} -
    {{ .Date.Format "Mon, Jan 2, 2006" }}
    -
  • -{{ end }} + ``` {{% /code %}} @@ -406,6 +406,7 @@ Hugo provides some functions for grouping pages by Section, Type, Date, etc. {{% code file="layouts/partials/by-page-field.html" %}} ```html + {{ range .Data.Pages.GroupBy "Section" }}

    {{ .Key }}