How to get current file name in Hugo without .md
By Flavio Copes
Learn how to get the current file name in Hugo without the .md extension using a short template snippet that trims it from .File.LogicalName.
~~~
This is the template snippet that does the job:
{{ trim .File.LogicalName ".md" }} ~~~
Related posts about hugo: