Configure HUGO server for .htm files

Hi. For my project I have to render specific pages in different output formats (.html, .htm).
I managed to do that like so:

In config.toml :

    suffixes = ['htm']

    isHTML = true
    mediaType = 'text/htm'

I use baseof.htm, single.htm and index.htm layouts for that and
specify in front matter how each individual site should be built like so:

- htm

With the hugo command the /public/ folder gets built just the way I want
but hugo server seems not to be able to interpret the text/htm MIME type.
(Firefox is asking me what application I want to use to open .htm files while Chrome
is just displaying the raw code).

So I tried to configure the hugo server in config.toml:

    for = '/**'
      Accept = 'text/html, text/htm'

I also created /config/development/server.toml (as suggested in the docs):

for = '/**'
  Accept = 'text/html, text/htm'

Finally I created a .htaccess file in the /static/ folder with:
AddType text/htm .htm

Also tried:
AddType text/html .htm

But nothing worked.

When I open the .htm files which are generated by hugo in the /public/ folder, either locally
or on a web-server, it works though.

So… maybe I am going about this the wrong way?

Any suggestions?

hugo version: hugo v0.89.2+extended darwin/amd64

Thanks in advance,

mediaType = 'text/htm'

There is no media type text/htm. It’s always text/html to display HTML files. You want to display a file with the ending .htm and let the browser display parsed HTML. so the media type is always text/html.

Thanks @davidsneighbour.

I already tried that. But that causes hugo to generate .html files in the /public/ folder instead of .htm

Also I thought I would be adding that mediaType by:

    suffixes = ['htm']