HTML File and Remove Link Extension

Two things…

1.) I want to change default file extension. I read MANY older config file examples and help websites/tutorial and it is not helping. What is the current method for changing default file extension; for example .html to .htm.

2.) How do you make Hugo not include a file extension in the final compiled html code (for all links); for example if all links were going to a directory but not actually…? For example link is domain.com/file.htm and I want the compiled html code to have the link compiled and saved as domain.com/file

Gracias!!

I’ve already read this page many times. This page is not detailed enough for me. I only wanted info for the 2 questions I asked. Thanks.

The information you want is on that page. If not, we should improve that page to avoid having to repeatedly have to answer this question in the future.

Can you have another read and see if you understand?

If not, I will put it into the backlog of docs items to improve.

Can you describe it more visually and with a example; with fewer words? The website is not clear. I have tested everything listed on the website. I agree the page needs something else on it.

I tried this type

[mediaTypes]
[mediaTypes.“text/html”]
suffix = “htm”

And I also tried this type

defaultExtension = “htm”

For the extensions… Are both config files needed config.toml and config.yml?
I thought someone would reply more to my questions.

Nobody replied to the second question in my first post. Do you know the answer?

See the section about changing suffix here:

Can someone please explain why this config is not working,

#1 I tried config this way (does not create html files):
[mediaTypes]
[mediaTypes.“text/html”]
suffix = “htm”

[outputFormats]
[outputFormats.HTML]
mediaType = "text/html"
isPlainText = true

[outputs]
home = [“HTML”]
page = [“HTML”]

#2 I tried config this way (does not create html files):
[mediaTypes]
[mediaTypes.“text/html”]
suffix = “htm”

[outputFormats]
[outputFormats.HTM]
mediaType = "text/html"
isPlainText = true

[outputFormats.MyFormat]
mediaType = "text/html"
baseName = "myindex"
isPlainText = true

[outputs]
home = [“HTM”]
page = [“HTM”]

I think you need to show the full source (GitHub link?) for use to be able to help you. The devil is always in the details.

I don’t plan to use GitHub. But I will upload one to Gifhub if that helps you see. But why?, because I do not have anything written yet, I am only editing the config file. I can’t write anything until the config file functions properly. What you see in this thread is all I have so far.

Ok here is a GitHub link

OK. I will wait until you have more.

This is the github
I just need to know how to fix the config file.