I’ve searched on here and found this thread: Create JSON for list section only. I’m trying to do the same thing as the OP wrote in that thread, create a json file for a list section only.
Inside _index.md, I’ve done as bep suggested in that thread, and added outputs:
+++
date = 2017-10-01T01:08:19+02:00
title = "Products"
outputs = ["HTML", "RSS", "JSON"]
+++
I’ve then created a json file, index.json, in Layouts > Products > index.json. I would assume that I should then be able to access the json file by visiting: http://localhost:1313/products/index.json but that doesn’t work so I must be missing something?
Just needed to change the name on the json file from index to list. It’s enough to list the outputs in _index.html, not needed in config.toml. Appreciate the help.