How to get current file name in Hugo without .md

Dream of running a solo Internet business? join my substack

This is the template snippet that does the job:

{{ trim .File.LogicalName ".md" }}