HUGO
Getting a filename without the extension
support
jmooring
March 5, 2022, 1:15am
2
{{ strings.TrimSuffix (path.Ext .Name) .Name }}
References:
https://gohugo.io/content-management/page-resources/#properties
https://gohugo.io/functions/strings.trimsuffix
https://gohugo.io/functions/path.ext
10 Likes
Hugo Tutorials & Tips
show post in topic
Related topics
Topic
Replies
Views
Activity
Just get the base filename using page resources metadata
support
4
901
March 13, 2021
How to trim extention of image file?
support
3
315
May 18, 2022
Trim string from param
support
2
459
July 16, 2019
Original filename of named page resource?
support
4
336
August 20, 2022
Resources.GetMatch and imageConfig
1
493
February 17, 2020