项目文件夹

文件
2026-07-13 11:58:46 +08:00

525 B

title, description, categories, keywords, params
title description categories keywords params
ByLength Returns the given page collection sorted by content length in ascending order.
functions_and_methods
returnType signatures
page.Pages
PAGES.ByLength
{{ range .Pages.ByLength }}
  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}

To sort in descending order:

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