The byzantine Custom Output Formats table in the docs

I’m confused by the lack of a 1:1 relationship between this table and actual Hugo behavior.

In the table, every mediaType has a “map”:

map[delimiter:. mainType:text string:text/html subType:html suffixes:[html] type:text/html]

But in Hugo itself, and the config, you will see just the MIME type: text/html. This “map” construction is not explained in the docs, and using it in the config doesn’t seem to do anything. I’m interested in getting down to nuts and bolts and re-creating / customizing the default HTML output format, and I can’t do that if I don’t have an accurate understanding of that table. I’ve noted an issue with name vs. Name, which makes me wonder if the rest of the table is accurate.

baseName

the base filename for the list filenames (homepage, etc.). Default: index .

Is this true? I’ve had some success customizing baseName even on single content pages.

there are 2 different things

You define a media-type in the output format, with media-type you define the file extension.

some definitions are defined in hugo. The DOC contains the default values.

I had problems to overwrite definitions ex. RSS and created output format FEED.

from my config

  [mediaTypes."application/rss+xml"]
    suffixes               = ["rss.xml"]

[outputFormats.FEED]       ##### ==> no collision with buildin RSS!
    MediaType              = "application/rss+xml"
    BaseName               = "feeds/feed"
    IsHTML                 = false
    IsPlainText            = true
    noUgly                 = true
    Rel                    = "alternate"

[outputs]
    home                   = [ "HTML", "ATOM", "JSON", "FEED", "MANIFEST", "SITEMAP"]

hope this gives some light on it :wink: