HUGO
Menu
GitHub 87548 stars Mastodon

ByTitle

返回給定頁面集合按標題升序排序。

Syntax

PAGES.ByTitle

Returns

page.Pages
{{ range .Pages.ByTitle }}
  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}

要按降序排序:

{{ range .Pages.ByTitle.Reverse }}
  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}

Last updated: January 1, 0001
Improve this page