HUGO
Menu
GitHub 87548 stars Mastodon

Title

返回给定菜单项的 title 属性。

Syntax

MENUENTRY.Title

Returns

string

Title 方法返回给定菜单项的 title 属性。如果未定义 title,并且菜单项解析为页面,则 Title 返回页面的 Title

<ul>
  {{ range .Site.Menus.main }}
    <li><a href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a></li>
  {{ end }}
</ul>

Last updated: January 1, 0001
Improve this page