Skip to content

template function: passing sub result to slicestr #1347

@benzwu

Description

@benzwu
{{ substr .Title 0 (sub (len .Title) 1) }}

got this error

executing "theme/_default/list.html" at <1>: wrong type for value; expected int; got int64

from http://discuss.gohugo.io/t/template-list-of-content-adding-s-to-section-name-as-page-title-title/1547

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions