dsm0688 2016-09-01 16:33
浏览 119

把手内的Hugo语法文档?

I'm trying to build a site with Hugo and having a hard time understanding some of their documentation. Specifically, when displaying frontmatter in a template.

There are functions you can preform on variables inside the handle bars. ex: {{ range .Data.Pages }} What is range? I can't find any documentation on what these functions do. Or is it just plain Go code and anything Go is fair game? Just looking for documentation so I can figure out what I need.

  • 写回答

1条回答 默认 最新

  • dongtang3155 2017-04-23 02:17
    关注

    These are functions that have specifically been made available to Go templates (you can't just use any Go functions). They include the built-in functions documented in the golang.org template docs which JimB linked to in his comment, and also Hugo-specific functions which are documented on the Hugo template functions page.

    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算