I believe you’re referring to part 2.
Until very recently there was no way to assign an output format to only certain pages, (pages inside a section for ex). It was either all pages or no pages at all.
[outputs]
page = ["json", "players"]
This is why you get the warning, as following the article walkthrough, only the pages of type teams
should have a template file for the custom output at layouts/teams/single.players.json
.
Now you should still get an endpoint at /teams/players.json
in spite of the warning which only concern other pages (without the players
template file).
Today though, to remove the warning, you can use e the cascade
keyword inside content/teams/_index.md
to limit the assignment to its children pages.
# content/teams/_index.md
Title: Teams
cascade:
outputs:
- HTML
- JSON
- players
# As cascade also applies to self we should overwrite here as this list page does not sport a players output (nor template file for it):
outputs
- HTML
- JSON
Hope this helps!