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