Get The Base Name of an Elixir Template File
Since you seem to know what the file extension is, you can use Path.basename/2. 

"foo.html.eex"
  |&gt; Path.basename(".eex")
  |&gt; IO.puts


If you don’t know the file extension, you can use Path.extname/1 in conjunction. 

filename = "foo.html.eex"
filename
  |&gt; Path.basename(Path.extname(filename))
  |&gt; IO.puts