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
768
March 13, 2021
How to trim extention of image file?
support
3
272
May 18, 2022
Original filename of named page resource?
support
4
300
August 20, 2022
Resources.GetMatch and imageConfig
1
445
February 17, 2020
Get extension of file name?
support
7
3684
April 10, 2019