Output format questions


#1

I’m noticing some interesting behaviour with output formats and I’m not sure if it is intentional or a bug.
When using output formats I assumed that html would be included by default but it seems as though it is not.

outputs:
  page:
    - amp

The above only generates amp output files in the amp directory. Is this intentional? Should html always be rendered?

The one that really tripped me up was that links go to whatever output format is defined first. ie

outputs:
  page:
    - amp
    - html

vs

outputs:
  page:
    - html
    - amp

The former causes all links on my blog page to point to the amp pages, while the latter points to the html pages.

Would just like some clarification on whether or not this is the intended behaviour. And if it is, the second case especially, this should probably be added to some documentation.

Thanks in advance.


#2

It is by design and, I believe, documented. I would say it would be pretty weird if we always included HTML by default, as it would make it impossible to create, say, a JSON only page. And we have to nominate one as the main output: the first one defined. Again, I think it would confuse even more people if we, say, picked one by random.

I think both your points should be covered below this:

If not, pull requests to make it clearer is always welcome.


#3

I was unable to find either of these things documented on that page. PR submitted.
FWIW no where did I suggest that you should pick a format at random. I just wanted to clarify the expected behaviour.

Thanks.