Skip to content

How to get current file name in Hugo without .md

This is the template snippet that does the job:

{{ trim .File.LogicalName ".md" }}
→ Get my Go Handbook

Here is how can I help you: