ref
少于1分钟
将以下英文翻译为中文:
ref
https://gohugo.io/functions/ref/
Returns the absolute permalink to a page.
语法
ref . PAGE
This function takes two parameters:
- The context of the page from which to resolve relative paths, typically the current page (
.) - The path to a page, with or without a file extension, with or without an anchor. A path without a leading
/is first resolved relative to the given context, then to the remainder of the site.
| |
To return the absolute permalink to another language version of a page:
| |
To return the absolute permalink to another Output Format of a page:
| |
Hugo emits an error or warning if the page cannot be uniquely resolved. The error behavior is configurable; see Ref and RelRef Configuration.
This function is used by Hugo’s built-in ref shortcode. For a detailed explanation of how to leverage this shortcode for content management, see Links and Cross References.
另请参阅
最后修改 June 1, 2023: 新增一个配置参数:sidebar_menu_truncate = 500 用于解决菜单不全的问题 (27810f1)