mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 06:17:45 +00:00
1 parent
bc0b484d1b
commit
16726eacf4
1 file changed
+36
-1
@@ -424,7 +424,7 @@ In the above example, you may want `{{.Title}}` to point the `title` field you h
|
|||||||
### By Publish Date
|
### By Publish Date
|
||||||
|
|
||||||
{{< code file="layouts/partials/by-page-publish-date.html" >}}
|
{{< code file="layouts/partials/by-page-publish-date.html" >}}
|
||||||
<!-- Groups content by month according to the "publishdate" field in front matter -->
|
<!-- Groups content by month according to the "publishDate" field in front matter -->
|
||||||
{{ range .Pages.GroupByPublishDate "2006-01" }}
|
{{ range .Pages.GroupByPublishDate "2006-01" }}
|
||||||
<h3>{{ .Key }}</h3>
|
<h3>{{ .Key }}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -438,6 +438,41 @@ In the above example, you may want `{{.Title}}` to point the `title` field you h
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
|
|
||||||
|
### By Lastmod
|
||||||
|
|
||||||
|
{{< code file="layouts/partials/by-page-lastmod.html" >}}
|
||||||
|
<!-- Groups content by month according to the "lastMod" field in front matter -->
|
||||||
|
{{ range .Pages.GroupByLastmod "2006-01" }}
|
||||||
|
<h3>{{ .Key }}</h3>
|
||||||
|
<ul>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
<div class="meta">{{ .Lastmod.Format "Mon, Jan 2, 2006" }}</div>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
{{< /code >}}
|
||||||
|
|
||||||
|
### By Expiry Date
|
||||||
|
|
||||||
|
{{< code file="layouts/partials/by-page-expiry-date.html" >}}
|
||||||
|
<!-- Groups content by month according to the "expiryDate" field in front matter -->
|
||||||
|
{{ range .Pages.GroupByExpiryDate "2006-01" }}
|
||||||
|
<h3>{{ .Key }}</h3>
|
||||||
|
<ul>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
<div class="meta">{{ .ExpiryDate.Format "Mon, Jan 2, 2006" }}</div>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
{{< /code >}}
|
||||||
|
|
||||||
### By Page Parameter
|
### By Page Parameter
|
||||||
|
|
||||||
{{< code file="layouts/partials/by-page-param.html" >}}
|
{{< code file="layouts/partials/by-page-param.html" >}}
|
||||||
|
|||||||
Reference in new issue
Block a user